| From: | Alban Hertroys <haramrae(at)gmail(dot)com> |
|---|---|
| To: | Brian Fehrle <brianf(at)consistentstate(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Query performance help with 'shadow table' approach. |
| Date: | 2011-09-14 22:13:59 |
| Message-ID: | 08D99B68-DFA1-4764-9B0E-FB2D04B14272@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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 be playing with the random_page_cost that Ondrej suggested, and schedule a time where I can do some explain analyzes (production server 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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Steve Crawford | 2011-09-14 22:43:50 | Re: Noob help for charting on web site, need assistance |
| Previous Message | Tomas Vondra | 2011-09-14 21:56:56 | Re: PostgreSQL benchmarked on XFS vs ZFS vs btrfs vs ext4 |