On Fri, Jun 29, 2012 at 2:48 PM, Richard Hipp <d...@sqlite.org> wrote:
> On Fri, Jun 29, 2012 at 3:40 PM, Nico Williams <n...@cryptonector.com>wrote:
>> So, if I understand section 3.2 of the SQLite4 design page then it
>> will often be the case that lookup keys will not be stored in an order
>> that will be useful for optimizing common ORDER BY expressions.  Is
>> this correct?
>
>
> Not correct.  The keys are encoded (see
> http://www.sqlite.org/src4/doc/trunk/www/key_encoding.wiki) in a way that
> causes a lexicographical ordering of the keys to correspond to what the
> user wants out of ORDER BY.  So indices can still be used for fulfilling
> ORDER BY.

Ah, I hadn't seen that.  That's very clever.

>>  If so, is this worth the trade-off for the single
>> key/value storage complexity?  Or is this wrong because the key
>> comparison function to be used will be aware of of data typing in the
>> encoding of the keys?
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to