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

Поиск
Список
Период
Сортировка
От Ross J. Reedstrom
Тема Re: performance regression, 7.2.3 -> 7.3b5 w/ VIEW
Дата
Msg-id 20021113152011.GE22656@wallace.ece.rice.edu
обсуждение исходный текст
Ответ на Re: performance regression, 7.2.3 -> 7.3b5 w/ VIEW  (Tommi Maekitalo <t.maekitalo@epgmbh.de>)
Список 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);


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Ross J. Reedstrom"
Дата:
Сообщение: Re: performance regression, 7.2.3 -> 7.3b5 w/ VIEW
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump in 7.4