Re: [PERFORM] Query running a lot faster with enable_nestloop=false

2011-11-03 Thread Robert Haas
On Tue, Oct 25, 2011 at 5:09 AM, Mohanaraj Gopala Krishnan wrote: > I have a query that runs a lot slower (~5 minutes) when I run it with > the default enable_nestloop=true and enable_nestloop=false (~10 secs). > The actual query is available here http://pastie.org/2754424 . It is a > reporting qu

Re: [PERFORM] Query running a lot faster with enable_nestloop=false

2011-10-25 Thread Robins Tharakan
Hi Mohanaraj, One thing you should certainly try is to increase the default_statistics_target value from 50 up to say about 1000 for the larger tables. Large tables tend to go off on estimates with smaller values here. I guess I am not helping here, but apart from your query, those estimate

[PERFORM] Query running a lot faster with enable_nestloop=false

2011-10-25 Thread Mohanaraj Gopala Krishnan
Hi guys, I have a query that runs a lot slower (~5 minutes) when I run it with the default enable_nestloop=true and enable_nestloop=false (~10 secs). The actual query is available here http://pastie.org/2754424 . It is a reporting query with many joins as the database is mainly used for transactio