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

From: Дмитрий Шалашов <skaurus(at)gmail(dot)com>
To: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Partitioned tables and SELECT ... ORDER BY ... LIMIT
Date: 2014-10-16 12:35:13
Message-ID: CAKPeCUFwqc9OTYjtGAam=tu3E1e2SaNp69YnovUPP5f3c6EAnw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi,

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?

Best regards,
Dmitriy Shalashov

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message François Beausoleil 2014-10-16 13:19:12 Re: Partitioned tables and SELECT ... ORDER BY ... LIMIT
Previous Message Tom Lane 2014-10-15 22:58:14 Re: Partitions and work_mem?