From: | Theo Galanakis <Theo(dot)Galanakis(at)lonelyplanet(dot)com(dot)au> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Query Plan |
Date: | 2004-09-09 05:30:48 |
Message-ID: | 82E30406384FFB44AFD1012BAB230B55037D0584@shiva.au.lpint.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Have a question regarding when a Query Plan uses an Index.
I have a basic statement
This query uses the Index Scan:
explain analyse select * from tablea where columna_id < 57
This query uses Seq Scan:
explain analyse select * from tablea where columna_id < 58
There are about 5000 records in this table, and columna_id is the primary
key, which is Indexed... And recently recreated.
My question is why is the Plan not using the index on the second occasions?
Theo
______________________________________________________________________
This email, including attachments, is intended only for the addressee
and may be confidential, privileged and subject to copyright. If you
have received this email in error, please advise the sender and delete
it. If you are not the intended recipient of this email, you must not
use, copy or disclose its content to anyone. You must not copy or
communicate to others content that is confidential or subject to
copyright, unless you have the consent of the content owner.
From | Date | Subject | |
---|---|---|---|
Next Message | Theo Galanakis | 2004-09-09 07:32:06 | |
Previous Message | Greg Stark | 2004-09-09 03:48:18 | Re: Isnumeric function? |