durusmail: quixote-users: OT - zodb best practices with quixote
OT - zodb best practices with quixote
2003-01-06
2003-01-07
OT - zodb best practices with quixote
Andrew Kuchling
2003-01-07
On Tue, Jan 07, 2003 at 11:09:55AM -0800, Mike Watkins wrote:
>This is the sort of feedback I was looking for - 'ya there's no indexing
>but it hasn't mattered because...'.

I think that looking up things by an ID is the common case for many
web applications -- show me this catalog item, show me this weblog
entry -- and this is easy with the ZODB, because you just have a
B-tree or dictionary keyed on the ID.  Summarizing tasks are harder,
the simplest implementation being just brute-force crawling through
all of the relevant objects.  So far everything fits in memory making
this fast enough, but it wouldn't scale to 10x the number of objects.

I'm not sure an RDBMS would help with that, though, because lots of
our brute-force scans aren't just looking at a single attribute.
Instead they're doing some computation -- not necessarily a very
elaborate computation, but the SQL queries to implement them would be
really complex, and might need to be written as stored procedures.

Using stored procedures means that logic is now split between Python
code and SQL code, making the system more complicated; one benefit of
sticking with the ZODB is that everything is written in one language.

--amk                                                             (www.amk.ca)
Humour is a tricky thing. Some people can't even get the spelling right.
      -- Richard Brodie, 30 Oct 2000

reply