Thanx,

it's great!

  I am glad to see the index on the master_id  field is really used
by optimizer in the SELECT...WHERE...  statement.  And what I didn't expect
to see that this index is used also in the next statement :

 SELECT * FROM my_table ORDER BY master_id;

  Now I have a new question  Is it an expected behaviour of the 2.8.15
optimizer to use
the index on  the field in case of  SELECT ... ORDER BY the_field
statement?
Serge Liber






Look at the "OpenRead" opcodes in the EXPLAIN list. Check the second
paramter (I think), it is the root page in the sqlite_master table. It
shows you if the engine opens index files or not.

> -----Original Message-----
> From: Serge Liber [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 15, 2005 2:51 PM
> To: [email protected]
> Subject: [sqlite] How can I verify that the index is really used?
>
> Hi,
>
> How can I verify that my
> SELECT * FROM my_table WHERE master_id = 5 statement uses the
> index created in the field master_id in my_table?
> EXPLAIN doesn't explain it to me.
>
> Thanx,
>
> Serge Liber
>

Reply via email to