Re: Increasing work_mem and shared_buffers on Postgres 9.2 significantly slows down queries
В списке pgsql-performance по дате отправления:
| От | Andres Freund |
|---|---|
| Тема | Re: Increasing work_mem and shared_buffers on Postgres 9.2 significantly slows down queries |
| Дата | |
| Msg-id | 20121109175345.GA16999@awork2.anarazel.de обсуждение исходный текст |
| Ответ на | Increasing work_mem and shared_buffers on Postgres 9.2 significantly slows down queries (Petr Praus <petr@praus.net>) |
| Список | pgsql-performance |
On 2012-10-30 14:08:56 -0500, Petr Praus wrote: > select count(*) from contest c > left outer join contestparticipant cp on c.id=cp.contestId > left outer join teammember tm on tm.contestparticipantid=cp.id > left outer join staffmember sm on cp.id=sm.contestparticipantid > left outer join person p on p.id=cp.personid > left outer join personinfo pi on pi.id=cp.personinfoid > where pi.lastname like '%b%' or pi.firstname like '%a%'; Btw, not really related to the question, but the way you use left joins here doesn't really make sense and does lead to inferior plans. As you restrict on 'pi', the rightmost table in a chain of left joins, there is no point in all those left joins. I would guess the overall plan is better if use straight joins. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера