Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

auto_explain on session not working for postgresql 11

Tags:

postgresql

I have used this code to get the query plan of my function. It didn't create any logs . It ran successfully and result is coming. Can any one help me to get the query plan of query inside the function. I used this script to get the query plan.

LOAD 'auto_explain';
SET auto_explain.log_min_duration = 0;
SET auto_explain.log_analyze = true;
SET auto_explain.log_nested_statements = on;
select get_report('{"fromDate":"2019-01-22","toDate":"2019-11-29","storeId":1}');
like image 334
Arun Avatar asked May 31 '26 16:05

Arun


1 Answers

To get the plans of nested statements logged,

SET auto_explain.log_nested_statements = on;
like image 92
Laurenz Albe Avatar answered Jun 02 '26 09:06

Laurenz Albe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!