Обсуждение: AutoExplain printing sql_hash and plan_hash

Поиск
Список
Период
Сортировка

AutoExplain printing sql_hash and plan_hash

От
ashok raj
Дата:
Hello Team, 

We are printing the Explain Analyze plan for the slow queries using auto_explain extension. To do more analysis,  I think it would be nice to print sql_hash and plan_hash along with the explain plan. 

Currently from the docs I don't see a way todo this. 

Thanks,
Ashokraj

Re: AutoExplain printing sql_hash and plan_hash

От
Julien Rouhaud
Дата:
hi

Le ven. 24 févr. 2023 à 12:45, ashok raj <ashokexplorer@gmail.com> a écrit :
Hello Team, 

We are printing the Explain Analyze plan for the slow queries using auto_explain extension. To do more analysis,  I think it would be nice to print sql_hash and plan_hash along with the explain plan. 

Currently from the docs I don't see a way todo this. 

you're right it's not currently possible, but this feature was added last month and will be available with pg16. note that I'm only talking about the query_id (which should be what you call query hash) as there's no plan hash in postgres itself. there are exceptions for that like pg_store_plans but those can't add information to auto_explain output.