csv file or sqlite ?

Discussion in 'Python' started by frevol nicolas, Jul 25, 2006.

  1. 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
     
    frevol nicolas, Jul 25, 2006
    #1
    1. Advertising

  2. In <>, 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
     
    Marc 'BlackJack' Rintsch, Jul 25, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. klia
    Replies:
    0
    Views:
    300
  2. James Mills

    Re: importing csv file into sqlite

    James Mills, Dec 18, 2008, in forum: Python
    Replies:
    3
    Views:
    1,618
    John Machin
    Dec 19, 2008
  3. klia
    Replies:
    4
    Views:
    1,648
    John Machin
    Dec 19, 2008
  4. Carl Youngblood
    Replies:
    1
    Views:
    230
    Carl Youngblood
    Apr 9, 2005
  5. Replies:
    4
    Views:
    350
Loading...

Share This Page