Re: [sqlite] strategy adding indexes

2007-07-31 Thread RB Smissaert
Re: [sqlite] strategy adding indexes drh Tue, 31 Jul 2007 03:12:54 -0700 T&B <[EMAIL PROTECTED]> wrote: > Hi RBS, > > > - indexes that include all possible combinations of fields that may > > appear > > in a WHERE clause. > > As an aside, note that,

Re: [sqlite] strategy adding indexes

2007-07-31 Thread Gerry Snyder
[EMAIL PROTECTED] wrote: http://www.sqite.org/optoverview.html In case the error in the URL above is not obvious to someone, it should be: http://www.sqlite.org/optoverview.html - To unsubscribe, send email to [

Re: [sqlite] strategy adding indexes

2007-07-31 Thread
Hi Richard, It's great to see clarity on this "from the horse's mouth" (I hope that translates across the equator). Thank you. - indexes that include all possible combinations of fields that may appear in a WHERE clause. As an aside, note that, AFAIK, indexes are only used: 1. To get the

Re: [sqlite] strategy adding indexes

2007-07-31 Thread drh
T&B <[EMAIL PROTECTED]> wrote: > Hi RBS, > > > - indexes that include all possible combinations of fields that may > > appear > > in a WHERE clause. > > As an aside, note that, AFAIK, indexes are only used: > > 1. To get the first match of a query. If you ask for more than one > matching rec

Re: [sqlite] strategy adding indexes

2007-07-30 Thread Cory Nelson
On 7/30/07, Bharath Booshan L <[EMAIL PROTECTED]> wrote: > Hi Tom, > > I have one more query regarding usage of indexes. > > > > > 2. From left to right in the same order as your index. So if you > > create index MyIndex on MyTable ( Column1, Column2, Column3 ), then > > you must test them in the s

Re: [sqlite] strategy adding indexes

2007-07-30 Thread Bharath Booshan L
Hi Tom, I have one more query regarding usage of indexes. > 2. From left to right in the same order as your index. So if you > create index MyIndex on MyTable ( Column1, Column2, Column3 ), then > you must test them in the same order, eg: where Column1 = Value1 and > Column2 = Value2 or Column3

RE: [sqlite] strategy adding indexes

2007-07-30 Thread RB Smissaert
Hi Tom, Thanks for that; useful to know. Didn't know about point 1 and 2 and that will complicate matters a bit further. RBS -Original Message- From: T&B [mailto:[EMAIL PROTECTED] Sent: 31 July 2007 00:39 To: sqlite-users@sqlite.org Subject: Re: [sqlite] strategy adding indexe

Re: [sqlite] strategy adding indexes

2007-07-30 Thread
Hi RBS, - indexes that include all possible combinations of fields that may appear in a WHERE clause. As an aside, note that, AFAIK, indexes are only used: 1. To get the first match of a query. If you ask for more than one matching record, the second, third etc matches are found by search