Re: [sqlite] Multi-column indexing

2016-08-22 Thread R Smith
On 2016/08/22 9:51 AM, Dominique Devienne wrote: On Sun, Aug 21, 2016 at 6:26 PM, Igor Tandetnik wrote: Create your index on nn(rsid, gene). Order of the fields matters. Imagine a phonebook sorted by last name then first name. It's easy to find in it all people named John Smith, or all peopl

Re: [sqlite] Multi-column indexing

2016-08-22 Thread Dominique Devienne
On Sun, Aug 21, 2016 at 6:26 PM, Igor Tandetnik wrote: > Create your index on nn(rsid, gene). Order of the fields matters. Imagine > a phonebook sorted by last name then first name. It's easy to find in it > all people named John Smith, or all people with last name of Smith, but > it's of no help

Re: [sqlite] Multi-column indexing

2016-08-21 Thread Igor Tandetnik
On 8/21/2016 4:37 AM, Kousik Kundu wrote: /but if I search as - / sqlite3 test.db "select * from n WHERE rsid = 'rs123'" - /It takes long time Create your index on nn(rsid, gene). Order of the fields matters. Imagine a phonebook sorted by last name then first name. It's easy to find in it a

[sqlite] Multi-column indexing

2016-08-21 Thread Kousik Kundu
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,