| От | Linos |
|---|---|
| Тема | unneeded joins on view |
| Дата | |
| Msg-id | 534E9E14.5000304@linos.es обсуждение исходный текст |
| Ответы |
Re: unneeded joins on view
|
| Список | pgsql-performance |
Hello all, I am trying to simplify some of the queries I use with my database creating a big view of all the possible attributes myitems can have, the view is rather large: http://pastebin.com/ScnJ8Hd3 I thought that Postgresql would optimize out joins on columns I don't ask for when I use the view but it doesn't, this query: SELECT referencia FROM articulo_view WHERE referencia = '09411000'; Have this query plan: http://explain.depesz.com/s/4lW0 Maybe I am surpassing some limit? I have tried changing from_collapse_limit and join_collapse_limit but still the plannerjoin the unneeded tables. Is possible to tell Postgresql do the right thing? If so, how? Thanks! Regards, Miguel Angel.
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера