On 12/14/17, Lifepillar <lifepil...@lifepillar.me> wrote:

> I am not familiar with virtual tables yet, but I see that they are used,
> for example, to implement Rtree indexes. Would it be feasible to
> implement my own index structure as a virtual table and use it to index
> a blob column in a standard table (or even just in the virtual table
> itself)?

That would be complicated.

A different idea.  Suppose you have two new UDFs:

ieee754dec(X):  Converts IEEE754-binary number X into IEEE754-decimal.
In other words it takes a "double" input and returns a "blob" output.

ieee754bin(Y):  Converts IEEE754-decimal blob Y and converts it into
IEEE754-binary.

Both routines are approximate because most IEEE754-binary values do
not have an exact equivalent IEEE754-decimal representation and vice
versa.  Your UDFs would need to find something very close.

Given these routines, you could then index your IEEE754-decimal
columns by doing an index on an expression using the new iee754bin()
function.
-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to