I am looking at the query plans for some of my postgres queries and i only see index scans or sequential scans. Doesn't postgres have a concept of seek? What do I need to do to make it use an index seek? I have read a lot of the documentation but can't find any reference to an index seek.
Thanks for the response.
SQL Serverfor eg: differenciates between a index seek versus a scan. A scan would go thru the entire index while a seek would look for certain entries.
Wondering if postgresql has a concept similar to that. (doesn't sound like it from your response).
differenciates between a index seek versus a scan. A scan would go thru the entire index while a seek would look for certain entries.
I still don't see a difference.
And besides: going through the entire index nearly never makes sense, because that means you'll want all rows anyway. So a full table scan will probably be more efficient.
The only reason for scanning an entire index could be sorting.
But if you are looking for a difference between "scanning" a range of index entries vs. picking a single row from an index, then I think the equivalent in Postgres is a Bitmap Index Scan vs. an Index Scan.
or if you are really interested in the technical details you should post this question to the PG mailing list. The developers (especially Tom Lane) are monitoring that and are extremely helpful
If you want to get the explanation from the "horse's mouth" that's the place to ask.