How to capture Execution plan for queries executed in past
search cancel

How to capture Execution plan for queries executed in past

book

Article ID: 430375

calendar_today

Updated On:

Products

VMware Tanzu SQL VMware Tanzu for Postgres

Issue/Introduction

Looking for Execution plan for queries executed in the past.

Explain plan gives plan for future execution. How do I see plan for historic executed queries.

Resolution

The following list outlines the Postgres modules that are additionally included with VMware Postgres, which includes "auto_explain"

https://techdocs.broadcom.com/us/en/vmware-tanzu/data-solutions/tanzu-for-postgres/16-9/tnz-postgres/contrib-modules.html

"auto_explain" setting allows automatic logging of explain plan during query execution, which allows historic tracking of the execution plan.

Additionally, Postgres documentation provides further details on the functionality and enabling of auto_explain setting.