Re: [sqlite] create one index on multiple columns or create multiple indexes, each of which is on one column?

2010-07-18 Thread Jay A. Kreibich
On Sun, Jul 18, 2010 at 04:31:20PM +0100, Simon Slavin scratched on the wall: > On 18 Jul 2010, at 2:56pm, Peng Yu wrote: > > So, in general, what the index I should use depends on what the select > > statement I might use? > Exactly. There is one index which is ideal for each SELECT statement.

Re: [sqlite] create one index on multiple columns or create multiple indexes, each of which is on one column?

2010-07-18 Thread Kit
2010/7/18 Peng Yu : >>> This question may be trivial. But I'm wondering, whether I should >>> create one index on multiple columns or create multiple indexes, each >>> of which is on a single column. > > select * from test group by value1,value2; > select * from test group by

Re: [sqlite] create one index on multiple columns or create multiple indexes, each of which is on one column?

2010-07-18 Thread Simon Slavin
On 18 Jul 2010, at 2:56pm, Peng Yu wrote: > On Sun, Jul 18, 2010 at 12:08 AM, Simon Slavin wrote: >> >> On 18 Jul 2010, at 5:46am, Peng Yu wrote: >> >>> I'm wondering, whether I should >>> create one index on multiple columns or create multiple indexes, each >>> of which

Re: [sqlite] create one index on multiple columns or create multiple indexes, each of which is on one column?

2010-07-18 Thread Peng Yu
On Sun, Jul 18, 2010 at 12:08 AM, Simon Slavin wrote: > > On 18 Jul 2010, at 5:46am, Peng Yu wrote: > >> This question may be trivial. But I'm wondering, whether I should >> create one index on multiple columns or create multiple indexes, each >> of which is on a single

Re: [sqlite] create one index on multiple columns or create multiple indexes, each of which is on one column?

2010-07-17 Thread Simon Slavin
On 18 Jul 2010, at 5:46am, Peng Yu wrote: > This question may be trivial. But I'm wondering, whether I should > create one index on multiple columns or create multiple indexes, each > of which is on a single column. > > The condition of the 'select' statement can be a logic operation on > any

[sqlite] create one index on multiple columns or create multiple indexes, each of which is on one column?

2010-07-17 Thread Peng Yu
This question may be trivial. But I'm wondering, whether I should create one index on multiple columns or create multiple indexes, each of which is on a single column. The condition of the 'select' statement can be a logic operation on any of the column of the table and their combinations. I