I think what he wants is a way to create an index on a virtual table. I
faced a similar problem recently and seeing that there was no apparent way
to do that I steered to a completely different way. Lets say I have a
immutable binary file which contains n rows of struct containing 10 (let's
name them a...j) integers (e.g. as they would be laid out by c in memory).
Writing a virtual table for it would be fairly easy. But what if I want to
make an index to help search rows? Like if I want to make an index on c and
on e,a. My solution would be to create a real table from the virtual table
code and index that. Is there any smarter ways?
Il 31/ott/2014 13:20 "Richard Hipp" <d...@sqlite.org> ha scritto:

> I don't really understand what you are asking, but I suspect that
> http://www.sqlite.org/withoutrowid.html is probably the answer you are
> looking for.
>
> On Fri, Oct 31, 2014 at 8:15 AM, Hick Gunter <h...@scigames.at> wrote:
>
> > Can you give an example of what such a beast would look like?
> >
> > CREATE TABLE not_exist (A, B, C, D, E);    -- for illustrative purposes
> > CREATE INDEX no_table ON not_exist (A,B,C,D,E); -- has to be covering
> index
> >
> > The only efficient order to return and/or select rows is by {A}, {A,B},
> > {A,B,C}, ...
> >
> > All other selects need to perform a full table/index scan, e.g. SELECT
> ...
> > WHERE C=15;
> > All other orders need to perform a sort, e.g. SELECT ... ORDER BY C;
> >
> > -----Ursprüngliche Nachricht-----
> > Von: Paul [mailto:de...@ukr.net]
> > Gesendet: Freitag, 31. Oktober 2014 11:30
> > An: General Discussion of SQLite Database
> > Betreff: [sqlite] Index without backing table
> >
> > Is there a way to have index without table?
> >
> > Is it possible to achieve this with virtual talbe tricks but without
> > implementing B-tree myself?
> >
> > I need this both for space effciency and to minimize disk I/O (by
> avoiding
> > table updates).
> > _______________________________________________
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> >
> >
> > ___________________________________________
> >  Gunter Hick
> > Software Engineer
> > Scientific Games International GmbH
> > FN 157284 a, HG Wien
> > Klitschgasse 2-4, A-1130 Vienna, Austria
> > Tel: +43 1 80100 0
> > E-Mail: h...@scigames.at
> >
> > This communication (including any attachments) is intended for the use of
> > the intended recipient(s) only and may contain information that is
> > confidential, privileged or legally protected. Any unauthorized use or
> > dissemination of this communication is strictly prohibited. If you have
> > received this communication in error, please immediately notify the
> sender
> > by return e-mail message and delete all copies of the original
> > communication. Thank you for your cooperation.
> >
> >
> > _______________________________________________
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> >
>
>
>
> --
> D. Richard Hipp
> d...@sqlite.org
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to