From: legrand legrand <legrand_legrand@hotmail.com>
To: pgsql-performance@postgresql.org
Subject: Re: Improving Performance of Query ~ Filter by A, Sort by B
Date: Wed, 11 Jul 2018 14:41:55 -0700 (MST)
Message-ID: <1531345315560-0.post@n3.nabble.com> (raw)
In-Reply-To: <CABcidk+P9Ujq-qvXXjivGrYjm7z_zJUgpjJEM8hXhrxgraR8_Q@mail.gmail.com>
References: <CABcidk+P9Ujq-qvXXjivGrYjm7z_zJUgpjJEM8hXhrxgraR8_Q@mail.gmail.com>
Hello,
I have tested it with release 11 and limit 20 is pushed to each partition
when using index on tmstmp.
Could you tell us what is the result of your query applyed to one partition
EXPLAIN ANALYZE
SELECT "a"."id"
FROM a_partition1 "a"
WHERE "a"."parent_id" IN (
34226,24506,40987,27162
)
ORDER BY "a"."tmstmp" DESC
LIMIT 20;
May be that limit 20 is not pushed to partitions in your version ?
Regards
PAscal
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-performance-f2050081.html
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: legrand_legrand@hotmail.com
Subject: Re: Improving Performance of Query ~ Filter by A, Sort by B
In-Reply-To: <1531345315560-0.post@n3.nabble.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