| От | Stuart McGraw |
|---|---|
| Тема | slowness when subselect uses DISTINCT |
| Дата | |
| Msg-id | AKEFJAHAPDBEDKIICNJKMEOHCCAA.smcg2297@frii.com обсуждение |
| Ответы |
Re: slowness when subselect uses DISTINCT
|
| Список | pgsql-sql |
I have several times now run into what seems like similar performance problems with some of my postgresql queries. I have a view that runs reasonably quicky. I use this view in a subselect in another query and that query too runs reasonably quicky. The view returns some unwanted duplicate rows so I modify it using either DISTINCT or GROUP BY to eliminate them. View still runs reasonably quickly. I use the modified view as a subselect as above, but now the query runs 2-3 orders of magnitude more slowly than before. Before I go through the effort of putting together a specific and concise test case, has anyone seen this general pattern and have an explanation or advice? (PG-8.2.3)
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера