Re: performance regression, 7.2.3 -> 7.3b5 w/ VIEW - Mailing list pgsql-hackers

From Tommi Maekitalo
Subject Re: performance regression, 7.2.3 -> 7.3b5 w/ VIEW
Date
Msg-id 200211130928.38199.t.maekitalo@epgmbh.de
Whole thread Raw
In response to performance regression, 7.2.3 -> 7.3b5 w/ VIEW  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
Responses Re: performance regression, 7.2.3 -> 7.3b5 w/ VIEW  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
List pgsql-hackers
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); 


Tommi

--
Dr. Eckhardt + Partner GmbH
http://www.epgmbh.de


pgsql-hackers by date:

Previous
From: "Ross J. Reedstrom"
Date:
Subject: Re: performance regression, 7.2.3 -> 7.3b5 w/ VIEW
Next
From: Lee Kindness
Date:
Subject: ecpg "problem" ...