Re: Query Performance / Planner estimate off

2020-10-21 Thread Justin Pryzby
On Wed, Oct 21, 2020 at 04:42:02PM +0200, Mats Olsen wrote: > On 10/21/20 2:38 PM, Sebastian Dressler wrote: > > > On 20. Oct 2020, at 11:37, Mats Julian Olsen > > > > > [...] > > > > > > 1) Vanilla plan (16 min) : https://explain.depesz.com/s/NvDR > > > > > >

Re: Query Performance / Planner estimate off

2020-10-21 Thread Mats Olsen
On 10/21/20 5:29 PM, Michael Lewis wrote: On Wed, Oct 21, 2020, 8:42 AM Mats Olsen > wrote: On 10/21/20 2:38 PM, Sebastian Dressler wrote: Hi Mats, On 20. Oct 2020, at 11:37, Mats Julian Olsen mailto:m...@duneanalytics.com>> wrote: [...

Re: CPU Consuming query. Sequential scan despite indexing.

2020-10-21 Thread aditya desai
Hi David, Thanks for the suggestion. Let me try to implement this as well. WIll get back to you soon. Regards, Aditya. On Thu, Oct 22, 2020 at 11:03 AM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Wed, Oct 21, 2020 at 10:22 PM aditya desai wrote: > >> As per application team, it

Re: CPU Consuming query. Sequential scan despite indexing.

2020-10-21 Thread David G. Johnston
On Wed, Oct 21, 2020 at 10:22 PM aditya desai wrote: > As per application team, it is business requirement to show last 60 days >> worth data. >> > I didn't look deeply but it sounds like you are looking backwards into 60 days worth of detail every single time you perform the query and computing

Re: CPU Consuming query. Sequential scan despite indexing.

2020-10-21 Thread aditya desai
Hi, Kindly requesting for help on this. Thanks. -Aditya. On Tue, Oct 20, 2020 at 6:00 PM aditya desai wrote: > Hi Laurenz, > I created > > On Fri, Oct 16, 2020 at 2:06 PM Laurenz Albe > wrote: > >> On Thu, 2020-10-15 at 20:34 +0530, aditya desai wrote: >> > Below query always shows up on top

Re: CPU Consuming query. Sequential scan despite indexing.

2020-10-21 Thread aditya desai
Hi, Kindly requesting an update on this. Thanks. -Aditya. On Tue, Oct 20, 2020 at 6:26 PM aditya desai wrote: > > > On Mon, Oct 19, 2020 at 9:50 PM Michael Lewis wrote: > >> Reply to the group, not just me please. Btw, when you do reply to the >> group, it is best practice on these lists to re

Re: Query performance

2020-10-21 Thread David G. Johnston
On Wed, Oct 21, 2020 at 5:32 PM Nagaraj Raj 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

Re: Query performance

2020-10-21 Thread Justin Pryzby
On Thu, Oct 22, 2020 at 12:32:29AM +, Nagaraj Raj wrote: > Hi, I have long running query which running for long time and its planner > always performing sequnce scan the table2.My gole is to reduce Read IO on the > disk cause, this query runns more oftenly ( using this in funtion for ETL).  >

Query performance

2020-10-21 Thread Nagaraj Raj
Hi, I have long running query which running for long time and its planner always performing sequnce scan the table2.My gole is to reduce Read IO on the disk cause, this query runns more oftenly ( using this in funtion for ETL).  table1: transfer_order_header(records 2782678)table2: transfer_orde

Re: Query Performance / Planner estimate off

2020-10-21 Thread Sebastian Dressler
Hi Mats, Happy to help. On 21. Oct 2020, at 16:42, Mats Olsen mailto:m...@duneanalytics.com>> wrote: On 10/21/20 2:38 PM, Sebastian Dressler wrote: Hi Mats, On 20. Oct 2020, at 11:37, Mats Julian Olsen mailto:m...@duneanalytics.com>> wrote: [...] 1) Vanilla plan (16 min) : https://explain.de

Re: Query Performance / Planner estimate off

2020-10-21 Thread Michael Lewis
On Wed, Oct 21, 2020, 8:42 AM Mats Olsen wrote: > > On 10/21/20 2:38 PM, Sebastian Dressler wrote: > > Hi Mats, > > On 20. Oct 2020, at 11:37, Mats Julian Olsen > wrote: > > [...] > > 1) Vanilla plan (16 min) : https://explain.depesz.com/s/NvDR > 2) enable_nestloop=off (4 min): https://explain.d

Re: Query Performance / Planner estimate off

2020-10-21 Thread Mats Olsen
On 10/21/20 2:38 PM, Sebastian Dressler wrote: Hi Mats, On 20. Oct 2020, at 11:37, Mats Julian Olsen > wrote: [...] 1) Vanilla plan (16 min) : https://explain.depesz.com/s/NvDR 2) enable_nestloop=off (4 min): https://explain

Re: Query Performance / Planner estimate off

2020-10-21 Thread Sebastian Dressler
Hi Mats, On 20. Oct 2020, at 11:37, Mats Julian Olsen mailto:m...@duneanalytics.com>> wrote: [...] 1) Vanilla plan (16 min) : https://explain.depesz.com/s/NvDR 2) enable_nestloop=off (4 min): https://explain.depesz.com/s/buKK 3) enable_nestloop=off; enable_seqscan=off (2 min): https://explain.