[elephant-devel] Re: Derived Indicies

Alex Mizrahi killerstorm at newmail.ru
Thu May 8 16:45:56 UTC 2008


 ??>> it postmodern backend each btree is backed by a database table,
 ??>> so i think it's not that negligable there..

 IE> Ah, I think the CL-SQL and BDB have different performance implications
 IE> then.  What is the purpose of doing it this way?  Are you specializing
 IE> the table on the type of the keys in some way?

yep, SQL is statically typed, so we only can have sorting if we specify 
actual type of the table.

 ??>> but i think it's quite easy to make cheap psets -- just a dup-btree
 ??>> of pset-oid->item
 IE> That's nice; that was the intention of the default pset implementation.

really? default implementation allocates btree for each pset.
but with dup btrees we can have one btree for many psets.

 IE>>> messages.  Of course to get the full efficiency you want, we'd
 ??>> have to
 IE>>> make a sorted-pset that sorts on some fn of the elements.
 ??>>
 ??>> sorted-pset? how can we sort something in database without having a
 ??>> key?

 IE> BDB can sort on values as well.

yes, I know, but how is it going to help us?
we need a list of message objects sorted by their dates. apparently pset 
item here is a message object, but how will you tell BDB to sort it on a 
specific slot?

 ??>> but, damn, it would be much harder to make cheap btrees with SQL..
 IE> Probably better to work on a native-lisp solution than to try to
 IE> contort SQL to do this!

maybe.
but it's not like that is completely undoable -- we can just have a table of 
tripples (btree_oid, key, value) sorted by all the three.
the only tricky thing here is dealing with types, but that's solvable -- we 
can have table for each key and value type combination.

 ??>> i thought elephant is a BDB wrapper :)

 IE> It was, once.  It's slowly evolving into an OODB, but people are so
 IE> used to SQL and ORM that I sense a strong leaning towards making the
 IE> data representation and query access look like those you find in ORM
 IE> systems.

i think main problem is not how it looks, but that query language actually 
makes programming a lot easier.




More information about the elephant-devel mailing list