From: | Christopher Browne <cbbrowne(at)acm(dot)org> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Query puts 7.3.4 on endless loop but 7.4beta5 is fine. [ with better indenting ] |
Date: | 2003-10-30 15:10:47 |
Message-ID: | m3smlaiww8.fsf@wolfe.cbbrowne.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
In the last exciting episode, mallah(at)trade-india(dot)com wrote:
>> mallah(at)trade-india(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-10-30 15:31:26 | Re: Ignoring index on (A is null), (A is not null) conditions |
Previous Message | scott.marlowe | 2003-10-30 14:29:32 | Re: vacuum locking |