Re: Slow query fixed by replacing equality with a nested query

Поиск
Список
Период
Сортировка
От Valentin Janeiko
Тема Re: Slow query fixed by replacing equality with a nested query
Дата
Msg-id CAPhGPA7iCqCxbvycaVWr3qjOf5gGv68f4zYwA-hWeUJVQSnreQ@mail.gmail.com
обсуждение исходный текст
Ответ на RE: Slow query fixed by replacing equality with a nested query  (<val.janeiko@gmail.com>)
Ответы Re: Slow query fixed by replacing equality with a nested query  (Michael Lewis <mlewis@entrata.com>)
Список pgsql-performance
I have rewritten the query using JOINs. I had to make one of them a
FULL JOIN, but otherwise JOINs seem like a good idea.
I have added the new query to the (same) gist:
https://gist.github.com/valeneiko/89f8cbe26db7ca2651b47524462b5d18#file-queryoptimized-sql
The query plan is much better with just a few small index scans which
completes in under a millisecond: https://explain.depesz.com/s/vBdG

Thank you for your help. Let me know if you have any other suggestions.



В списке pgsql-performance по дате отправления:

Предыдущее
От:
Дата:
Сообщение: RE: Slow query fixed by replacing equality with a nested query
Следующее
От: Michael Lewis
Дата:
Сообщение: Re: Slow query fixed by replacing equality with a nested query