[ZODB-Dev] ZODB queries (was ZODB and ORBit-Python problems)

John D. Heintz jheintz@isogen.com
Tue, 22 May 2001 12:45:01 -0500


Your point below about indexes replicating db data is pretty much the same
thing that RDBMS indexes do, and you generally have one index for each 
commonly search field or group of fields.  

You're right about the orthogonal part though.  With Catalogs and ZODB I
can (once we get some sample code and dox ;) build indexes for anything in
my db, but I can't separate that performance trade off (disk vs. perf) from
my application code.  That is what an orthogonal solution would enable.

John

On Tue, May 22, 2001 at 02:37:01PM -0300, Christian Robottom Reis wrote:
> On Tue, 22 May 2001, Greg Ward wrote:
> 
> > It sounds like you don't want a query language per se, but rather an
> > efficient query mechanism.  So would I!  I don't much mind writing
> > queries in Python -- simple queries are probably a bit wordier than they
> > would be with (say) OQL, but at least I don't have to learn another
> > language.  More importantly, I don't have to embed that new language in
> 
> Greg, 100% correct. I had ignored this point, but it's important -- the QL
> isn't the important part - a mechanism for querying, however, _is_.
> 
> SQL/OQL is nice if you want to provide for user-defined queries, but who
> wants users, anyway? :-)
> 
> > However, I *would* like to see some (documented and comprehensible)
> > infrastructure for indexing a ZODB.  (I've attempted to read the code
> > for Catalog and related classes, but came away understanding less than I
> > went in with.)  As it stands, if I want to query every Thing object in
> > our database, I have to loop over our collection of all Things, load
> > each into memory, and query it.  Our database isn't very big, so this
> 
> I believe both SearchIndex and Catalog (higher-level? who knows?) exist to
> solve this. As far as them being undocumented, I've offered to write-up as
> soon as somebody shows me some simple, short, working code that uses them.
> 
> I don't know, however, if a full solution is orthogonal to pickling, and
> nobody has answered if this point is moot. AFAICS if you use unstructured
> storage, your indexes will replicate attribute data that's in the DB, and
> you'll have the problems of syncing that during updates and deletes. Apart
> from that, you need a whole lot of indexes -- one for each query method.
> Am I off-track here?
> 
> > isn't a big deal (yet).  I can see that it would be a showstopper for
> > someone with (say) hundreds of thousands of Thing objects in their
> > database.
> 
> Which is where I fit in, unfortunately. :-)
> 
> Take care,
> --
> /\/\ Christian Reis, Senior Engineer, Async Open Source, Brazil
> ~\/~ http://async.com.br/~kiko/ | [+55 16] 274 4311
> 
> 
> _______________________________________________
> For more information about ZODB, see the ZODB Wiki:
> http://www.zope.org/Wikis/ZODB/
> 
> ZODB-Dev mailing list  -  ZODB-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zodb-dev