Re: Query puts 7.3.4 on endless loop but 7.4beta5 is fine. [ with better indenting ] - Mailing list pgsql-performance

From Christopher Browne
Subject Re: Query puts 7.3.4 on endless loop but 7.4beta5 is fine. [ with better indenting ]
Date
Msg-id m3smlaiww8.fsf@wolfe.cbbrowne.com
Whole thread Raw
In response to Query puts 7.3.4 on endless loop but 7.4beta5 is fine.  (<mallah@trade-india.com>)
Responses Re: Query puts 7.3.4 on endless loop but 7.4beta5 is fine.
List pgsql-performance
In the last exciting episode, mallah@trade-india.com wrote:
>> mallah@trade-india.com (Rajesh Kumar Mallah) wrote:
>>> Can you please have a Look at the below and suggest why it
>>> apparently puts 7.3.4 on an infinite loop . the CPU utilisation of the backend running it
>>> approches 99%.
>>
>> What would be useful, for this case, would be to provide the query plan, perhaps via
>>
>>  EXPLAIN [Big Long Query].
>>
>> The difference between that EXPLAIN and what you get on 7.4 might be quite interesting.
>>
>> I would think it quite unlikely that it is truly an "infinite" loop; it is rather more likely
>> that the plan winds up being pretty bad and doing something [a bunch of nested loops, maybe?]
>> that run longer than your patience will permit.
>
> :-)   ok i will leave it running and try to get it.

No, if you just do EXPLAIN (and not EXPLAIN ANALYZE), that returns
without executing the query.

If the query runs for a really long time, then we _know_ that there is
something troublesome.  EXPLAIN (no ANALYZE) should provide some
insight without having anything run for a long time.

If EXPLAIN [big long query] turns into what you are terming an
"infinite loop," then you have a quite different problem, and it would
be very useful to know that.
--
"cbbrowne","@","ntlug.org"
http://www3.sympatico.ca/cbbrowne/oses.html
This is Linux country.  On a quiet night, you can hear NT re-boot.

pgsql-performance by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: vacuum locking
Next
From: Tom Lane
Date:
Subject: Re: Ignoring index on (A is null), (A is not null) conditions