Cool!

I will try that!

Thanks Igor!


On 7/31/06, Igor Tandetnik <[EMAIL PROTECTED]> wrote:

Cesar David Rodas Maldonado
<[EMAIL PROTECTED]> wrote:
> How can I optimize this query
>
> select * from table where col1 = 5 && col2 = 15;
>
> If I  know that col2 I have 150000 rows and col1 I have just 100
> rows, I know that because I save that data in another table.
>
> How can I do for search first where is minus number of result?
>
>
> The two columns are indexes.

Try making it

select * from table where col1 = 5 and +col2 = 15;

The unary plus in front of col2 disqualifies it for use in an index, so
SQLite is likely to use an index on col1.

Igor Tandetnik


Reply via email to