Hi
If I have a table with a couple of indexed varchar fields e.g:
CREATE TABLE t (id INT, a VARCHAR(20), b VARCHAR(20)...);
CREATE INDEX ia ON t(a);
CREATE INDEX ib ON t(b);
then will the sqlite query optimizer use these indices in these SELECT's:
1. SELECT * FROM t WHERE a LIKE 'M%';
2. SELECT * FROM t WHERE a LIKE 'M%' ORDER BY a;
3. SELECT * FROM t WHERE a LIKE 'M%' ORDER BY b;
4. SELECT * FROM t WHERE a LIKE 'M%' ORDER BY b,a;
...such that none of them will result in a table scan?
Thx
--
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.476 / Virus Database: 269.10.6/902 - Release Date: 15/07/2007 14:21
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------