Re: [elephant-devel] Fwd: some patches

2007-08-03 Thread Robert L. Read
I agree with all of your last email. However, I think in your discussion of complexity of the existing operations in the CL-SQL side you are implying there are lots of O(n) operations when in fact this only occurs when one indexes a slot that has a small number of values relative to the number of

Re: [elephant-devel] Fwd: some patches

2007-08-03 Thread Ian Eslick
First of all, BDB does not sort on the serialized values except for values for which no lisp ordering exists. BDB is given a C function which decodes the serialized format on the fly, without talking to Lisp, but properly orders all of lisp's orderable objects. Orderable lisp types: 1. Num

Re: [elephant-devel] Fwd: some patches

2007-08-02 Thread Robert L. Read
Yes, I think I understand this. However, a costly alternative does exist: just never let BDB use its own order. Always impose one that we can compute in lisp. Then in BDB you store a (position,value) pair instead of a value, and either ensure that BDB sorts on the first part of the binary repr

Re: [elephant-devel] Fwd: some patches

2007-08-01 Thread Henrik Hjelte
On 7/31/07, Ian Eslick <[EMAIL PROTECTED]> wrote: > The practical problem that led to the current design of index sorting > is that we cannot use lisp code to define the sorting function for > serialized values inside BDB Btrees (same problem I imagine that > Henrik had with postmodern). Exactly,

Re: [elephant-devel] Fwd: some patches

2007-07-31 Thread Ian Eslick
The practical problem that led to the current design of index sorting is that we cannot use lisp code to define the sorting function for serialized values inside BDB Btrees (same problem I imagine that Henrik had with postmodern). Instead, there is a hairy custom C procedure that is regist

Re: [elephant-devel] Fwd: some patches

2007-07-31 Thread Robert L. Read
Personally, I think the only sensible way to handle this problem is to require the user to specify an ordering function. We can of course provide a default, which will be error-prone but tend to work most of the time. The function called "my-generic-less-than" which is in the source tree now cou

Re: [elephant-devel] Fwd: some patches

2007-07-24 Thread Ian Eslick
Robert and I have had some extended discussions on ordering in indices. I think that all we really need to agree on is _some_ canonical ordering. If we have mixed types in an index, how should they be ordered relative to each other? In BDB we have a C function which implements the orderi

[elephant-devel] Fwd: some patches

2007-07-24 Thread Henrik Hjelte
I sent this message yesterday but I guess it got stuck in the mailing list filter. Perhaps the attachment was too big. Since my common-lisp.net user hhjelte does not have write access to elephant I have placed the patches from here instead: darcs get http://common-lisp.net/project/grand-prix/darcs