Different query plans when running through application

Поиск
Список
Период
Сортировка
От srinivas oguri
Тема Different query plans when running through application
Дата
Msg-id CADfH0ytshR4JghzPtaGJxQYW1jeger000DdVTH=GAZGj8_L0bQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Different query plans when running through application
Список pgsql-admin
Hi team,

We have seen a query running from application(Java based) is taking wrong plan. It is a partitioned table, when the query is executed it is scanning all partitions. When I execute the query manually from psql it is scanning the right partition. 

1. Stats are up to date (we have scheduled a hourly job to analyze the table partitions which are used in the query along with tuning autovacuum process).
2. We are using Amazon aurora with 9.6.9 version.

Please help me in troubleshooting this.

Thanks
Srinivas

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

Предыдущее
От: mallikarjun t
Дата:
Сообщение: Re: the difference between psql , createdb, dropuser
Следующее
От: Craig James
Дата:
Сообщение: Re: Different query plans when running through application