pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Kumar, Mukesh <MKumar@peabodyenergy.com>
To: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: View taking time to show records
Date: Sat, 26 Mar 2022 05:37:38 +0100
Message-ID: <2988e92ed6eb90d60014d2f879c73bc9ceaf5d1f.camel@cybertec.at> (raw)
In-Reply-To: <CH0P221MB0474CF7EA6C4767FD11B707EDE1A9@CH0P221MB0474.NAMP221.PROD.OUTLOOK.COM>
References: <CH0P221MB04748BF130CDFF2625EDB396DE199@CH0P221MB0474.NAMP221.PROD.OUTLOOK.COM>
	<3de146f0ea4ae3bab84be8e1c888d64d11ca6606.camel@cybertec.at>
	<CH0P221MB0474CF7EA6C4767FD11B707EDE1A9@CH0P221MB0474.NAMP221.PROD.OUTLOOK.COM>

On Fri, 2022-03-25 at 14:07 +0000, Kumar, Mukesh wrote:

> > [recommendation to fix the estimate]
> >
> > Perhaps it is also enough to blindly disable nested loop joins for the whole query,
> > rather than doing the right thing and fixing the estimates:
> >
> > BEGIN;
> > SET LOCAL enable_nestloop = off;
> > SELECT ...;
> > COMMIT;
> 
> Thanks for the below suggestion , When I ran the query with the parameter , it is taking only 1 sec.
> 
> So could you please let me know if I can put this parameter to OFF . at database and it will not
> create any issues to queries running in database.

That will very likely cause problems in your database, because sometimes a nested loop join
is by far the most efficient way to run a query.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






view thread (6+ messages)

Message-ID: <2988e92ed6eb90d60014d2f879c73bc9ceaf5d1f.camel@cybertec.at>
Permalink:  ../2988e92ed6eb90d60014d2f879c73bc9ceaf5d1f.camel@cybertec.at/
Also on:    postgresql.org/message-id/2988e92ed6eb90d60014d2f879c73bc9ceaf5d1f.camel@cybertec.at

 · 

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: laurenz.albe@cybertec.at, MKumar@peabodyenergy.com
  Subject: Re: View taking time to show records
  In-Reply-To: <2988e92ed6eb90d60014d2f879c73bc9ceaf5d1f.camel@cybertec.at>

* 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