Hello,
I am wondering how to create multiple indexing in a table and then
search either by one column name or by combination of two column names.
For example, I have created a table as below -
/CREATE TABLE nn (ID TEXT, rsid TEXT, gene TEXT, pval NUMERIC, beta
NUMERIC, pval_bonf NUMERIC, FDR NUMERIC, ATLAF NUMERIC, STDERR NUMERIC);//
//.separator " "//
//.import /home/data.txt n//
//
//CREATE INDEX gene_rsid//
//on nn(gene, rsid);/
Now, If I search for two columns (gene and rsid) like
/sqlite3 test.db "select * from n WHERE rsid = 'rs123' AND gene =
'XYZ'" - /It works perfectly,
OR
/sqlite3 test.db "select * from n WHERE rsid = gene = 'XYZ'" -/ It
also works/
/but if I search as - /
sqlite3 test.db "select * from n WHERE rsid = 'rs123'" - /It takes
long time
I want to search by either of the column name or with the combination. I
would appreciate, if anybody could help me to solve this problem. Thank
you very much.
Best regards,
Kousik
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users