473,397 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

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.
http://fr.answers.yahoo.com

Jul 25 '06 #1
1 4960
In <ma***************************************@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
Jul 25 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: John Salerno | last post by:
I've been looking around and reading, and I have a few more questions about SQLite in particular, as it relates to Python. 1. What is the current module to use for sqlite? sqlite3? or is that not...
2
by: applegreenss | last post by:
Is it possible to take the contents of a MySQL DB Table, and somehow put the data into a syntax-correct data file format like a delimited ..txt file, and using PHP parse it as a local c:\ file...
10
by: rohit | last post by:
hi, i am developing a desktop search.For the index of the files i have developed an algorithm with which i should be able to read and write to a line if i know its line number. i can read a...
3
by: rustyhowell | last post by:
I'm trying to store binary data in a sqlite database and call into the db using pysqlite 3. What I've got so far is this: import sqlite con = sqlite.connect(DB_PATH) cur = con.cursor() query...
0
by: mahdaeng | last post by:
I have a little Windows application written in C# with a SQLite back- end. I'm using the System.Data.SQLite provider. One of the features the application provides is a database back-up, which...
10
by: Luigi | last post by:
Hello all! I'm a newbie in PHP. I have written a short script that tries to update a SQLite database with the user data. It is pretty simple, something like this: <?php $sqlite =...
9
by: Gilles Ganault | last post by:
Hello I was looking for a lighter web server than Apache, and installed Lighttpd on CentOS through yum. It works fine, but I now need to use SQLite from a PHP script. I seem to understand that...
1
by: Gilles Ganault | last post by:
Hello There's not much activity in the Lighttpd forum, so I figured maybe some people here use this web server instead of Apache, and would know the cause of the problem. PHP scripts can...
3
by: Daniel Fetchinson | last post by:
Does Python 2.5.2's embedded SQLite support full text searching? Sqlite itself is not distributed with python. Only a python db api compliant wrapper is part of the python stdlib and as such it...
20
by: timotoole | last post by:
Hi all, On a (sun) webserver that I use, there is python 2.5.1 installed. I'd like to use sqlite3 with this, however sqlite3 is not installed on the webserver. If I were able to compile sqlite...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.