[blf@Logging /~]:

September 17, 2008

[ZT] Why isn’t PostgreSQL using my index?

Filed under: database, PostgreSQL — blowfisher @ 9:24 am
    ...PostgreSQL's query optimizer is smart, really smart and unless you have evidence otherwise you should trust what it is doing. In this particular case, the optimizer realizes that if a table has only a few rows that using the index is actually slower than just spinning through the entire table. Just because PostgreSQL isn't using your index today with a small number of rows, does not mean it won't choose to use it later when you have more data or the query changes...

No Comments »

No comments yet.

RSS feed for comments on this post.

Leave a comment

You must be logged in to post a comment.

www.blowfisher.net  |  Powered by WP