Re: Performance issue post upgrade on Version 13 - Incorrect Estimation Cost choosing Hash Aggregate-Nested Left Loop Join

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Prajna Shetty <Prajna(dot)Shetty(at)mindtree(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-performance(at)postgresql(dot)org, Beenu Sharma <Beenu(dot)Sharma(at)mindtree(dot)com>, Pranabesh Saha <Pranabesh(dot)Saha(at)mindtree(dot)com>, Surya Susai <Surya(dot)Susai(at)mindtree(dot)com>
Subject: Re: Performance issue post upgrade on Version 13 - Incorrect Estimation Cost choosing Hash Aggregate-Nested Left Loop Join
Date: 2022-03-24 12:24:14
Message-ID: 20220324122414.GZ28503@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-performance

On Tue, Mar 22, 2022 at 12:57:10PM +0000, Prajna Shetty wrote:
> 1. We have performed Vacuum/Analyze/Reindex post Upgrade.
> 2. Tweaked work_mem so it does not spill to Disk. We can Disk Usage But it is still using Hash Aggregate and came down from 5 minutes to 20 seconds. (Expected ~5 seconds). Attached plan after modifying work_mem
> 3. Disabled Seqcan/ nestedloop
> 4. Tweaked random_page_cost/seq_page_cost
> 5. Set default_statistics_target=1000 and then run vacuum(analyze,verbose) on selected tables.
> 6. We have also tested performance by increasing resources up to 4 vCPU and 32 GB RAM.

Would you provide your current settings ?
https://wiki.postgresql.org/wiki/Server_Configuration

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Masahiko Sawada 2022-03-24 14:23:57 Re: BUG #17385: "RESET transaction_isolation" inside serializable transaction causes Assert at the transaction end
Previous Message Tomas Vondra 2022-03-24 11:55:41 Re: Performance issue post upgrade on Version 13 - Incorrect Estimation Cost choosing Hash Aggregate-Nested Left Loop Join

Browse pgsql-performance by date

  From Date Subject
Next Message Kumar, Mukesh 2022-03-24 15:59:54 View taking time to show records
Previous Message Tomas Vondra 2022-03-24 11:55:41 Re: Performance issue post upgrade on Version 13 - Incorrect Estimation Cost choosing Hash Aggregate-Nested Left Loop Join