On Mon, Feb 15, 2010 at 07:46:55PM +0200, Tom Hacohen wrote:
>    I think if sqlite does support indexing according to a substring (which I
>    doubt it does)
>    then this could make everything way faster and there won't be a need to
>    keep the normalized
>    number in the db at all.

We could always add a custom comparison function for numbers that check
the number from tail to head. This way two numbers will be considered
equal if n - 4 number are equal (and for example two of the 4 numbers
that are not equal start with 00) ... Then indexing will be done
accordingly with this comparison function. Writing the function is very
easy : http://www.sqlite.org/c3ref/create_collation.html

collating sequences : http://www.sqlite.org/datatype3.html

-- 
----
http://en.wikipedia.org/wiki/Posting_style
_______________________________________________
Shr-devel mailing list
[email protected]
http://lists.shr-project.org/mailman/listinfo/shr-devel

Reply via email to