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

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

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