csv file or sqlite ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • frevol nicolas

    #1

    csv file or sqlite ?

    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.
    Latest news coverage, email, free stock quotes, live scores and video are just the beginning. Discover more every day at Yahoo!


  • Marc 'BlackJack' Rintsch

    #2
    Re: csv file or sqlite ?

    In <mailman.8516.1 153822077.27775 .python-list@python.org >, frevol nicolas
    wrote:
    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

    Comment

    Working...