Re: performance regression, 7.2.3 -> 7.3b5 w/ VIEW

From: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>
To: Tommi Maekitalo <t(dot)maekitalo(at)epgmbh(dot)de>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: performance regression, 7.2.3 -> 7.3b5 w/ VIEW
Date: 2002-11-13 15:20:11
Message-ID: 20021113152011.GE22656@wallace.ece.rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

You're right, I should remove that (cruft left over from when the
subselect wasn't). However, it has no impact on the planner at hand:
removing it does trim 25% from the execution time, but getting the
WHERE clauses used in the right order gains an order of magnitude.

Both apply. Thanks, I'll fix it.

Ross

On Wed, Nov 13, 2002 at 09:28:38AM +0100, Tommi Maekitalo wrote:
> Am Mittwoch, 13. November 2002 07:22 schrieb Ross J. Reedstrom:
> > Hey Hackers -
> ...
> >
> > CREATE VIEW current_modules AS
> > SELECT * FROM modules m
> > WHERE module_ident =
> > (SELECT max(module_ident) FROM modules
> > WHERE m.moduleid = moduleid GROUP BY moduleid);
> >
> ...
>
> I just wonder if you really need the GROUP BY. The subselect should return
> exactly one row and so max does without GROUP BY:
> CREATE VIEW current_modules AS
> SELECT * FROM modules m
> WHERE module_ident =
> (SELECT max(module_ident) FROM modules
> WHERE m.moduleid = moduleid);

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-11-13 15:22:17 Re: pg_dump in 7.4
Previous Message Ross J. Reedstrom 2002-11-13 15:14:15 Re: performance regression, 7.2.3 -> 7.3b5 w/ VIEW