Re: Using keys and left()

2004-09-24 Thread Alec . Cawley
"Alexander Newald" <[EMAIL PROTECTED]> wrote on 23/09/2004 19:28:09: > > > > Does > >select count(id) from test where id like "d%" ; > > work any better? I would expect it to make better use of the index. > > > >Alec > > > > Hello, > > yes it works better for sets of data with ve

Re: Using keys and left()

2004-09-23 Thread Alexander Newald
- Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, September 23, 2004 5:27 PM Subject: Re: Using keys and left() "Alexander Newald" <[EMAIL PROTECTED]> wrote on 23/09/2004 15:57:51: Hello, I ha

Re: Using keys and left()

2004-09-23 Thread Alec . Cawley
"Alexander Newald" <[EMAIL PROTECTED]> wrote on 23/09/2004 15:57:51: > Hello, > > I have a db with abount 8 lines in it. I now like to count the lines > where the first char of the id is "d": > > mysql> select count(id) from test where left(id,1) = "d"; > +---+ > | count(id)