[elephant-devel] Re: Derived Indicies
Alex Mizrahi
killerstorm at newmail.ru
Sun Mar 23 21:27:16 UTC 2008
IE> unnecessary. If you have messages indexed by time than you can simply
IE> walk the index and filter by user until you have a web page worth of
IE> messages.
worst case behaviour is very bad -- to prove that there are no messages, it
will have to scan all of them..
what's even worse, this worst case is quite frequent -- many users actually
have empty inboxes.
IE> A scan, even of an index, may not be fast enough so you could do an
IE> intersection of user-to values with an ordered list of recent messages.
you mean reading oids from user-to index and scanning/filtering
modification-time index with them?
this will mean same worst case.
of course sufficiently smart system can see which list is less, but still
with thousands of messages and thousands of users this is going to be quite
slow.
IE> This should perform similarly to a SQL engine which many ORM systems
IE> use for queries like this.
i thought in SQL DBMS expression like "create index tree11_idx on
tree11(qi,value)"
builds ordered list (btree) of pairs pretty much as in derived index i've
described, and this will make lookups on both values fast.
More information about the elephant-devel
mailing list