| От | Tom Lane |
|---|---|
| Тема | Re: subselect query time and loops problem |
| Дата | |
| Msg-id | 24401.1113089179@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | subselect query time and loops problem (pankaj naug <pankajnaug@yahoo.com>) |
| Список | pgsql-sql |
pankaj naug <pankajnaug@yahoo.com> writes:
> Both servers have same version with same postgresql.conf. But the time taken by both the servers with subselect are
waydifferent. the loops and the query time are completely different. both servers have same indexes.
Evidently one has been analyzed much more recently than the other,
because the estimated row counts are wildly different.
You didn't say which PG version this is, but I gather that it's pre-7.4,
which means that the performance of IN (SELECT ...) is generally going
to be awful. Either rewrite as a join or update to 7.4 or later.
regards, tom lane
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера