Re: Improving Performance of Query ~ Filter by A, Sort by B

From: legrand legrand <legrand_legrand(at)hotmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Improving Performance of Query ~ Filter by A, Sort by B
Date: 2018-07-11 21:41:55
Message-ID: 1531345315560-0.post@n3.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Lincoln Swaine-Moore 2018-07-11 23:31:46 Re: Improving Performance of Query ~ Filter by A, Sort by B
Previous Message 2018-07-11 14:16:09 High concurrency but simple updating causes deadlock