Re: Partitioned tables and SELECT ... ORDER BY ... LIMIT

From: François Beausoleil <francois(at)teksol(dot)info>
To: Дмитрий Шалашов <skaurus(at)gmail(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Partitioned tables and SELECT ... ORDER BY ... LIMIT
Date: 2014-10-16 13:19:12
Message-ID: DB23C183-B0A0-4023-839C-A5EBB34CF1D8@teksol.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hello!

Le 2014-10-16 à 08:35, Дмитрий Шалашов <skaurus(at)gmail(dot)com> a écrit :
> lets imagine that we have some table, partitioned by timestamp field, and we query it with SELECT with ordering by that field (DESC for example), with some modest limit.
> Lets further say that required amount of rows is found in the first table that query encounters (say, latest one).
> I am just wondering, why nevertheless PostgreSQL does read couple of buffers from each of the older tables?

Could you share a specific plan with us, as well as your PostgreSQL version? It would make the conversation much easier.

Can you also confirm your constraint_exclusion parameter is set to either 'partition' or 'on'?

Thanks!
François Beausoleil

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Дмитрий Шалашов 2014-10-16 13:33:09 Re: Partitioned tables and SELECT ... ORDER BY ... LIMIT
Previous Message Дмитрий Шалашов 2014-10-16 12:35:13 Partitioned tables and SELECT ... ORDER BY ... LIMIT