Re: [PERFORM] Ramifications of turning off Nested Loops for slow queries

2008-03-04 Thread Chris Kratz
On 3/4/08, Tom Lane <[EMAIL PROTECTED]> wrote: > > "Kevin Grittner" <[EMAIL PROTECTED]> writes: > > On Tue, Mar 4, 2008 at 8:42 AM, in message > > <[EMAIL PROTECTED]>, Chris Kratz > > <[EMAIL PROTECTED]> wrote: > >> So, I've now been asked to ping the list as to whether turning off > >> nested loo

Re: [PERFORM] Ramifications of turning off Nested Loops for slow queries

2008-03-04 Thread Chris Kratz
On 3/4/08, Kevin Grittner <[EMAIL PROTECTED]> wrote: > > >>> On Tue, Mar 4, 2008 at 8:42 AM, in message > > Any other thoughts or suggestions? > > > Make sure your effective_cache_size is properly configured. > > Increase random_page_cost and/or decrease seq_page_cost. > You can play with the cost

Re: [PERFORM] Ramifications of turning off Nested Loops for slow queries

2008-03-04 Thread Tom Lane
"Kevin Grittner" <[EMAIL PROTECTED]> writes: > On Tue, Mar 4, 2008 at 8:42 AM, in message > <[EMAIL PROTECTED]>, Chris Kratz > <[EMAIL PROTECTED]> wrote: >> So, I've now been asked to ping the list as to whether turning off >> nested loops system wide is a bad idea, and why or why not. > In o

Re: [PERFORM] Ramifications of turning off Nested Loops for slow queries

2008-03-04 Thread Kevin Grittner
>>> On Tue, Mar 4, 2008 at 8:42 AM, in message <[EMAIL PROTECTED]>, Chris Kratz <[EMAIL PROTECTED]> wrote: > So, I've now been asked to ping the list as to whether turning off > nested loops system wide is a bad idea, and why or why not. In our environment, the fastest plan for a lot of que

[PERFORM] Ramifications of turning off Nested Loops for slow queries

2008-03-04 Thread Chris Kratz
Hello Everyone, I had posted an issue previously that we've been unable to resolve. An early mis-estimation in one or more subqueries causes the remainder of the query to choose nested loops instead of a more efficient method and runs very slowly (CPU Bound). I don't think there is any wa