Re: View taking time to show records - Mailing list pgsql-performance

From Laurenz Albe
Subject Re: View taking time to show records
Date
Msg-id 2988e92ed6eb90d60014d2f879c73bc9ceaf5d1f.camel@cybertec.at
Whole thread Raw
In response to View taking time to show records  ("Kumar, Mukesh" <MKumar@peabodyenergy.com>)
List pgsql-performance
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




pgsql-performance by date:

Previous
From: "Kumar, Mukesh"
Date:
Subject: RE: View taking time to show records
Next
From: Rambabu g
Date:
Subject: HIGH IO and Less CPU utilization