Re: Why does a normally fast query run so slow when the table is in a partition?

From: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
To: Bill Thoen <bthoen(at)gisnet(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Why does a normally fast query run so slow when the table is in a partition?
Date: 2011-02-02 22:10:17
Message-ID: 4D49D649.2020809@pinpointresearch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 02/02/2011 01:35 PM, Bill Thoen wrote:
> Steve Crawford wrote:
>> On 02/02/2011 12:17 PM, Bill Thoen wrote:
>>> I've got a large (and growing) database set up as a partitioned
>>> database....
>> What is the setting of contstraint_exclusion?
>> http://www.postgresql.org/docs/9.0/static/runtime-config-query.html#GUC-CONSTRAINT-EXCLUSION
>>
>>
>> Cheers,
>> Steve
> It's set to 'Partition'
>
That sounds good. Out of curiosity, what happens if you use an explicit
cast?:
...where 'co'::char(2)...

I've seen lots of cases where the planner doesn't use indexes when the
data-type differs sometimes even subtly. Might be the same for
constraint exclusion.

Cheers,
Steve

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message matty jones 2011-02-02 22:58:05 set theory question
Previous Message Yves Weißig 2011-02-02 21:16:42 effective_io_concurrency