Re: Indexed Query examining too many rows!

2012-02-13 Thread Cabbar Duzayak
Hi, As you can see in my query, % is not in the beginning. Once again, it is : select * from DataIndex where (searchKey like 'A%') order by searchKey limit 10 where searchKey has a btree on it. As Peter was saying, percent in the beginning does a full table scan as expected. Thanks. On Mon, Fe

Re: Indexed Query examining too many rows!

2012-02-12 Thread Peter Brawley
On 2/12/2012 4:40 PM, Reindl Harald wrote: Am 12.02.2012 23:25, schrieb Cabbar Duzayak: Hi All, I have a table with a btree index on its searchKey column, and when I send a simple query on this table: explain select * from DataIndex where (searchKey like 'A%') order by searchKey limit 10 rows

Re: Indexed Query examining too many rows!

2012-02-12 Thread Reindl Harald
Am 12.02.2012 23:25, schrieb Cabbar Duzayak: > Hi All, > > I have a table with a btree index on its searchKey column, and when I > send a simple query on this table: > > explain select * from DataIndex where (searchKey like 'A%') order by > searchKey limit 10 > > rows is returning 59548 and it