On Wed, Oct 21, 2020 at 5:32 PM Nagaraj Raj <nagaraj...@yahoo.com> wrote:

> Hi, I have long running query which running for long time and its planner
> always performing sequnce scan the table2.
>

 FROM sor_t.transfer_order_header hed,sor_t.transfer_order_item itm
>  where hed.eventid=itm.eventid group by 1,2,3,4,5,6
>
> Any suggestions would greatly appretiated.
>

You aren't filtering out any rows so it is unsurprising that a sequential
scan was chosen to fulfil the request that the entire detail table be
consulted.  The good news is you have access to parallelism - see if you
can increase that factor.

Any other suggestions probably requires more knowledge of your problem
domain than you've provided here.

Finding a way to add a where clause or compute your desired result during
record insertion or updating are two other potential avenues of
consideration.

David J.

Reply via email to