Re: query taking too long

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Johnson, Shaunn" <SJohnson6(at)bcbsm(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: query taking too long
Date: 2003-03-28 20:48:12
Message-ID: 24734.1048884492@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Johnson, Shaunn" <SJohnson6(at)bcbsm(dot)com> writes:
> <P><FONT SIZE=3D2>How can I modify this to be more efficient?</FONT>

[Please don't post HTML...]

I think the first question to ask is whether it's even correct. It
looks to me like the EXISTS doesn't depend on the outer query, so
it's effectively a constant, and assuming that the constant is TRUE,
*every* row of db2_pos_fac_rev_02 will be returned.

Also, have you done VACUUM ANALYZE lately? The explain estimates
seem suspiciously low.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Guy Fraser 2003-03-28 21:40:21 Re: Realistic upper bounds on DB size
Previous Message Johnson, Shaunn 2003-03-28 20:34:49 query taking too long