Re: Query performance help with 'shadow table' approach. - Mailing list pgsql-general

From Alban Hertroys
Subject Re: Query performance help with 'shadow table' approach.
Date
Msg-id 08D99B68-DFA1-4764-9B0E-FB2D04B14272@gmail.com
Whole thread Raw
In response to Re: Query performance help with 'shadow table' approach.  (Brian Fehrle <brianf@consistentstate.com>)
List pgsql-general
On 14 Sep 2011, at 20:45, Brian Fehrle wrote:

>> That is only about 1/30th of your table. I don't think a seqscan makes sense here unless your data is distributed
badly.
>>
> Yeah the more I look at it, the more I think it's postgres _thinking_ that it's faster to do a seqential scan. I'll
beplaying with the random_page_cost that Ondrej suggested, and schedule a time where I can do some explain analyzes
(productionserver and all). 

Before you do that, turn off seqscans (there's a session option for that) and see if index scans are actually faster.

Alban Hertroys

--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.


pgsql-general by date:

Previous
From: Greg Howard
Date:
Subject: Noob help for charting on web site, need assistance
Next
From: Steve Crawford
Date:
Subject: Re: Noob help for charting on web site, need assistance