csv file or sqlite ?

F

frevol nicolas

hi,

I am programming a filter for websites. to check if an
url is in the blacklist, i have used a csv file. i
have try to use sqlite but it looks as fast as csv
files.

Can you tell me if sqlite is faster than csv files ?
or not ?

thanks






___________________________________________________________________________
Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet !
Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences.
http://fr.answers.yahoo.com
 
M

Marc 'BlackJack' Rintsch

frevol nicolas said:
I am programming a filter for websites. to check if an
url is in the blacklist, i have used a csv file. i
have try to use sqlite but it looks as fast as csv
files.

Can you tell me if sqlite is faster than csv files ?
or not ?

Depends on the number of records/lines and how you access them.

If you have some kind of server and read the csv file into a set or
dictionary and query this thousands of times, it's faster than querying a
database the same amount of times.

If you have really many items in that blacklist and just query a few of
them per program run, say in a CGI script, then a database will become
faster than linear searching through a csv file.

Just try both and measure to know for sure.

Ciao,
Marc 'BlackJack' Rintsch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top