Re: select taking forever - Mailing list pgsql-general

From Shridhar Daithankar
Subject Re: select taking forever
Date
Msg-id 3F4F82F1.25080.4D6295C@localhost
Whole thread Raw
In response to select taking forever  (Steven Tower <tower@towerhome.cx>)
Responses Re: select taking forever
List pgsql-general
On 29 Aug 2003 at 7:04, Steven Tower wrote:

>
> I have a basic SQL call that takes forever because Postgresql seems to want to
> use a Seq row scan on the table Products which has around 41k rows. Below is
> the sql call and the explain.
>
> explain select * from ChargeCodes where AccountID = '{58C215AA-2C71-446F-88F3-
> BC2C0D23EF28}' and ChargeCodeID IN (Select ChargeCodeID from Products where
> ProductID in (select ProductID from OrderRules where WebUserRoleID
> in (Select WebUserRoleID from WebUsers where WebUserID = '{3CD5D4F5-
> 448B-11D5-83DB-0001023EA2FA}')))

So many in's nested? I doubt a 7.3.x would survive that.

Upgrade to 7.4 beta2. The 'in' problem is taken care of, in there..

Can you somehow rewrite that as nested joins? They could be much better..

Bye
 Shridhar

--
There comes to all races an ultimate crisis which you have yet to face.... One day our minds became so powerful we
daredthink of ourselves as gods.        -- Sargon, "Return to Tomorrow", stardate 4768.3 


pgsql-general by date:

Previous
From: Bernd Helmle
Date:
Subject: Re: erserver 1.2 problem
Next
From: Martijn van Oosterhout
Date:
Subject: Re: PostgreSQL upgrade -> fails to start server