Hi, 

at the first sight i'd suggest that you reorder the rows of your index :

it is most likely that chr and strand will have many equal values in your 
example - especially chr. When chr is the first field of your Index than the 
path to find first differences in the btree to find the matching intervall will 
be longer. 

i'd try an index with reordered columns which wouldn't affect your application 
to much :

you can experiment for the right combination. 

i'd try this combinations for your index and measure the differences :

a) idx(start, stop, strand, chr)
b) idx(start, strand, chr, stop)
c) idx(stop, start, strand, chr)
d) idx(stop, strand, chr, start)
e) idx(strand, chr, start, stop)
f) idx(strand, chr, stop, start)

i think that all this indexes especially b and d will make your query faster.



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

Reply via email to