Hi All

1. Let's say I have a field called Field1 in table Table1 with the following 
rows:

"A B C"
"D E F"
"G H I"

Is there some way I can create an index on just a substring for a column 
without extracting the substring into it's own column, 
something like

CREATE INDEX I1 ON Table1 (substr(Field1, 3, 1))

2. Is there some hidden way we can limit what goes into an index in the first 
place and then do a select that would return only 
those entries.

In the dbase ".mdx" era you could supply expressions as a "tag" that would then 
determine what gets stored in the index / btree. (A 
real performance boost was then if one could use just the index value.)

eg.:

CREATE INDEX I1 ON Table1 (substr(Field1, 4, 1)>='E')

should then index only the last two rows from above, and doing something like

SELECT * FROM Table1 USING I1

should then return only the last two rows.

Many thanks!
Tima 

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to