Re: Order of execution

Поиск
Список
Период
Сортировка
От Jean-Christophe Boggio
Тема Re: Order of execution
Дата
Msg-id 83950412-6367-5bb8-aeb1-a07603acd649@thefreecat.org
обсуждение исходный текст
Ответ на Order of execution  (luis.roberto@siscobra.com.br)
Список pgsql-performance
Hello,

Le 27/04/2021 à 20:52, luis.roberto@siscobra.com.br a écrit :
> My question is: is it possible to optimize function order execution?

I guess you could change the cost of one of the functions.


I personally rewrite my queries but I don't know if it's good practice:

WITH pre AS (
   SELECT client_id
   FROM clients
   WHERE some_other_func(client_id)
)
SELECT *
FROM clients
JOIN pre USING(client_id)
WHERE some_func(client_id)

Best regards,

JC



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

Предыдущее
От: luis.roberto@siscobra.com.br
Дата:
Сообщение: Order of execution
Следующее
От: aditya desai
Дата:
Сообщение: Error while calling proc with table type from Application