From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Brian Hirt <bhirt(at)mobygames(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org, Brian Hirt <bhirt(at)loopy(dot)berkhirt(dot)com> |
Subject: | Re: [HACKERS] Optimizer badness in 7.0 beta |
Date: | 2000-03-05 14:15:45 |
Message-ID: | Pine.LNX.4.21.0003051506410.347-100000@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
This query can be rewritten as
SELECT creation_timestamp, etc.
FROM game, game_developer
WHERE game.game_id = game_developer.game_id
AND approved = 1 AND developer_id = 3
ORDER BY copyright_year desc, game_title
The way you're writing it you're almost asking it to be slow. :)
Of course that still doesn't explain why it's now 94sec versus formerly 1
but I'm sure Tom Lane will enlighten us all very soon. :)
Brian Hirt writes:
> select
> creation_timestamp,
[snip]
> from
> game
> where
> approved = 1
> and
> game_id in (
> select
> distinct game_id
> from
> game_developer
> where
> developer_id = 3)
> order by
> copyright_year desc,
> game_title;
--
Peter Eisentraut Sernanders väg 10:115
peter_e(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From | Date | Subject | |
---|---|---|---|
Next Message | Brian Hirt | 2000-03-05 21:01:32 | Re: [HACKERS] Optimizer badness in 7.0 beta |
Previous Message | Peter Eisentraut | 2000-03-05 13:39:37 | Re: [HACKERS] TransactionStateData and AbsoluteTime |