Re: Optimizer not using index when it should - Mailing list pgsql-performance

From Tom Lane
Subject Re: Optimizer not using index when it should
Date
Msg-id 26349.1051625899@sss.pgh.pa.us
Whole thread Raw
In response to Re: Optimizer not using index when it should  (Rod Taylor <rbt@rbt.ca>)
List pgsql-performance
Rod Taylor <rbt@rbt.ca> writes:
>> What can I do to fix this -- is there something I am missing about
>> setting statistics or some configuration variable I can change?  Any
>> insights would be greatly appreciated.  Thank you,

> You might try adjusting the random_page_cost down to something more
> appropriate for your hardware and situation.

Also, is the table physically ordered by dsid?  If so, is that condition
likely to persist?  You may be looking at a test-condition artifact
here --- a poor estimate for an ordered table may not mean much when
you get to realistic database states.

I assume you've done an ANALYZE of course --- what does the pg_stats row
for column dsid contain?

            regards, tom lane


pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Is 292 inserts/sec acceptable performance ?
Next
From: Tom Lane
Date:
Subject: Re: profiling plpgsql functions..