which db should I use?

Peter Hansen peter at engcorp.com
Mon May 13 21:23:51 EDT 2002


Jim Richardson wrote:
> 
> > No need to use grep, unless you want to.  Normally you would want to
> > index the files, so that a search for key words becomes an extremely
> > fast operation.  Even in a database...
> 
> wouldn't this be simply doing a db like approach? how would I go about
> learning about this in python? I wouldn't mind not having to have a few
> hundred MB of data in the newsspool *and* in some database. Would it be
> possible to simple have an "index" file that would give me the same
> search functions as SQL, seperate from the actual spool?

I'm not sure.  What's a newsspool? :-)

I would not normally think that "searching text" is the first thing
that comes to mind when one thinks of SQL and relational databases.
A full-text indexing application, on the other hand, sounds like what
you want.  I'm sure there are some notes on using Python for that
somewhere...

What parts of SQL do you expect to use to do this searching?  Maybe
that will give us a hint what you have in mind, and ideas whether
there might be a better approach.

(I'm sure SQL can do something like this, but it might be little
better performance-wise than doing "if item in list" turns out
to be in Python... that is, very slow since it just does a 
brute-force search from start to finish.)

-Peter



More information about the Python-list mailing list