| От | Tom Lane |
|---|---|
| Тема | Re: upgrade 8.1.4 -> latest, sort order subquery |
| Дата | |
| Msg-id | 28622.1182891625@sss.pgh.pa.us обсуждение |
| Ответ на | Re: upgrade 8.1.4 -> latest, sort order subquery (Richard Huxton <dev@archonet.com>) |
| Список | pgsql-general |
Richard Huxton <dev@archonet.com> writes:
> jef peeraer wrote:
>> registratie=# select * from module_info where type_module_id in
>> (select * from get_parent_type_modules(1));
>> The order is completely ignored, although there is an order by in the view
>> 'module_info'
> You're applying a where clause to the output of your view - filtering it
> after the sort is done. If that filter is e.g. by a hash then the result
> will be in a different order (or at least might be).
Yeah, that IN-clause will in fact be turned into a join. EXPLAIN would
give more info about what's happening, but I suspect the planner chose
to do the join via mergejoin, which would sort the inputs by the join
columns ...
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера