Re: slow sub-query problem

Поиск
Список
Период
Сортировка
От David G Johnston
Тема Re: slow sub-query problem
Дата
Msg-id 1416249886486-5827275.post@n5.nabble.com
обсуждение исходный текст
Ответ на slow sub-query problem  (Tim Dudgeon <tdudgeon.ml@gmail.com>)
Список pgsql-sql
Tim Dudgeon wrote
> All relevant columns are indexed and using PostgreSQL 9.4.
> Any clues how to re-write it to avoid the slow sub-query.

Try using an actual join instead of a subquery.  You will have to provide
aliases and then setup the where clause appropriately.

I am reading the query correctly in that the repeated reference to 643413 is
redundant?  The lack of a defined natural primary key makes blind reasoning
difficult.

David J.





--
View this message in context: http://postgresql.nabble.com/slow-sub-query-problem-tp5827273p5827275.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.



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

Предыдущее
От: Tim Dudgeon
Дата:
Сообщение: slow sub-query problem
Следующее
От: David Johnston
Дата:
Сообщение: Re: slow sub-query problem