pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nagaraj Raj <nagaraj.sf@yahoo.com>
To: Michael Lewis <mlewis@entrata.com>
To: Thomas Kellerer <shammat@gmx.net>
Cc: Pgsql Performance <pgsql-performance@lists.postgresql.org>
Subject: Re: Query performance issue
Date: Fri, 4 Sep 2020 21:44:14 +0000 (UTC)
Message-ID: <2010108831.405412.1599255854719@mail.yahoo.com> (raw)
In-Reply-To: <CAHOFxGo-YY-0RMzEx=JzNiu_M6fqpd1TskWDLGZ8xvfFEu813A@mail.gmail.com>
References: <975305787.3395625.1599254321500.ref@mail.yahoo.com>
	<975305787.3395625.1599254321500@mail.yahoo.com>
	<499793818.3392649.1599254645140@mail.yahoo.com>
	<CAHOFxGo-YY-0RMzEx=JzNiu_M6fqpd1TskWDLGZ8xvfFEu813A@mail.gmail.com>

 Sorry, I have attached the wrong query planner, which executed in lower environment which has fewer resources:
Updated one,eVFiF | explain.depesz.com


| 
| 
|  | 
eVFiF | explain.depesz.com


 |

 |

 |



Thanks,Rj    On Friday, September 4, 2020, 02:39:57 PM PDT, Michael Lewis <mlewis@entrata.com> wrote:  
 
 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'
  

view thread (57+ messages)  latest in thread

Message-ID: <2010108831.405412.1599255854719@mail.yahoo.com>
Permalink:  ../2010108831.405412.1599255854719@mail.yahoo.com/
Also on:    postgresql.org/message-id/2010108831.405412.1599255854719@mail.yahoo.com

reply

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: nagaraj.sf@yahoo.com, mlewis@entrata.com, shammat@gmx.net, pgsql-performance@lists.postgresql.org
  Subject: Re: Query performance issue
  In-Reply-To: <2010108831.405412.1599255854719@mail.yahoo.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