From: | Anj Adu <fotographs(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: sequential scan on child partition tables |
Date: | 2009-10-18 15:24:19 |
Message-ID: | f2fd819a0910180824u4846a214w6a0a43f75415b72@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
The actual data returned is a tiny fraction of the total table volume.
Is there a way to force an index scan on the partitions in a
guaranteed manner without resorting to re-writing queries with the
union all on partitions.
Thank you
Sriram
On Wed, Oct 14, 2009 at 10:15 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Anj Adu <fotographs(at)gmail(dot)com> writes:
>> This query is doing a sequential scan on the child partitions even
>> though indexes on all constrained columns are present
>
> It looks to me like it's doing exactly what it is supposed to, ie,
> indexscan on the partitions where it would help and seqscans on the
> partitions where it wouldn't. Indexscan is not better than seqscan
> for retrieving all or most of a table.
>
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-10-18 15:59:56 | Re: Calculation of unused columns |
Previous Message | Daniel Migowski | 2009-10-18 14:38:18 | Re: Calculation of unused columns |