From: Pandurangan R S <pandurangan.r.s@gmail.com>
To: Marc Cousin <mcousin@sigma.fr>
Cc: pgsql-performance@postgresql.org
Subject: Re: partitioning
Date: Tue, 13 Dec 2005 17:10:11 +0530
Message-ID: <5e744e3d0512130340r25159d86n840831eb5aa6dd65@mail.gmail.com> (raw)
In-Reply-To: <200512130920.47583.mcousin@sigma.fr>
References: <200512130920.47583.mcousin@sigma.fr>
Did you set constraint_exclusion = true in postgresql.conf file?
On 12/13/05, Marc Cousin <mcousin@sigma.fr> wrote:
> Hi,
>
> I've been working on trying to partition a big table (I've never partitioned a
> table in any other database till now).
> Everything went ok, except one query that didn't work afterwards.
>
> I've put the partition description, indexes, etc ..., and the explain plan
> attached.
>
> The query is extremely fast without partition (index scan backards on the
> primary key)
>
> The query is : "select * from logs order by id desc limit 100;"
> id is the primary key.
>
> It is indexed on all partitions.
>
> But the explain plan does full table scan on all partitions.
>
> While I think I understand why it is doing this plan right now, is there
> something that could be done to optimize this case ? Or put a warning in the
> docs about this kind of behaviour. I guess normally someone would partition
> to get faster queries :)
>
> Anyway, I thought I should mention this, as it has been quite a surprise.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
>
>
>
--
Regards
Pandu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: pandurangan.r.s@gmail.com, mcousin@sigma.fr
Subject: Re: partitioning
In-Reply-To: <5e744e3d0512130340r25159d86n840831eb5aa6dd65@mail.gmail.com>
References: <200512130920.47583.mcousin@sigma.fr> <5e744e3d0512130340r25159d86n840831eb5aa6dd65@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox