Re: Query performance issue

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: Nagaraj Raj <nagaraj(dot)sf(at)yahoo(dot)com>
Cc: Pgsql Performance <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: Re: Query performance issue
Date: 2020-09-04 21:39:12
Message-ID: CAHOFxGo-YY-0RMzEx=JzNiu_M6fqpd1TskWDLGZ8xvfFEu813A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

CREATE INDEX receiving_item_delivered_received
ON receiving_item_delivered_received USING btree ( eventtype,
replenishmenttype, serial_no, eventtime DESC );

>
More work_mem as Tomas suggests, but also, the above index should find the
candidate rows by the first two keys, and then be able to skip the sort by
reading just that portion of the index that matches

eventtype='LineItemdetailsReceived'
and replenishmenttype = 'DC2SWARRANTY'

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Michael Lewis 2020-09-04 21:41:23 Re: Query performance issue
Previous Message Tomas Vondra 2020-09-04 21:36:35 Re: Query performance issue