Re: [sqlite] Can multi-column index optimize my operation?

2009-08-13 Thread Kermit Mei
On Thu, 2009-08-13 at 23:39 -0400, Igor Tandetnik wrote: > Kermit Mei wrote: > > The mostly useful SQL sentence is (MyDevId is known by user): > > > > SELECT * FROM KeyItem WHERE HomeDevId=MyDevId order by pageNum; > > > > Now, the items of this table may be more than 100,000 lines. If I use > > th

Re: [sqlite] Can multi-column index optimize my operation?

2009-08-13 Thread Igor Tandetnik
Kermit Mei wrote: > The mostly useful SQL sentence is (MyDevId is known by user): > > SELECT * FROM KeyItem WHERE HomeDevId=MyDevId order by pageNum; > > Now, the items of this table may be more than 100,000 lines. If I use > the following Index, can it improve the previous query's speed? > > CREAT

[sqlite] Can multi-column index optimize my operation?

2009-08-13 Thread Kermit Mei
Hello, I have I table like this: CREATE TABLE KeyItem (icon_y int, icon_x int, id INTEGER PRIMARY KEY, pos_x int, pos_y int, size_x int, size_y int, type int, text varchar(15), icon varchar(50), background varchar(50), HomeDevId int, pageNum int); The mostly useful SQL sentence is (MyDevId is kno