partitioning

From: Marc Cousin <mcousin(at)sigma(dot)fr>
To: pgsql-performance(at)postgresql(dot)org
Subject: partitioning
Date: 2005-12-13 08:20:47
Message-ID: 200512130920.47583.mcousin@sigma.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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.

Attachment Content-Type Size
partition.txt text/plain 5.0 KB

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Jim C. Nasby 2005-12-13 08:22:34 Re: Memory Leakage Problem
Previous Message John Sidney-Woollett 2005-12-13 08:05:05 Re: Memory Leakage Problem