Blog Pages

PostgreSQL - EXPLAIN - Show execution plan

EXPLAIN
Display the execution plan which PostgreSQL generates.
EXPLAIN ANALYZE
Display more statistics. Display actual run-time statistics.



In order to analyze INSERT, UPDATE, DELETE without affecting the data – run EXPLAIN ANALYZE in a transaction:
BEGIN;
    EXPLAIN ANALYZE sql_statement;
ROLLBACK;

No comments:

Post a Comment