Using EXPLAIN in pgEdit

pgEdit has three commands to execute variations of PostgreSQL's EXPLAIN command. In PostgreSQL this command is used to provide execution plan information about the SQL statement. All three forms of the pgEdit command make it easy to use EXPLAIN for anything in your file without making modifications. The pgEdit Explain command simply executes the current SQL line containing the cursor with PostgreSQL's EXPLAIN keyword prepended to the statement. Similarly, the Explain Analyze command prepends EXPLAIN ANALYZE which actually executes the command giving actual rather than estimated statistics.

The third pgEdit explain command is called Explain Analyze with Transaction. This command is like the Explain Analyze command except that it also starts the sequence with a new transaction and then rolls back the transaction after the explain command is complete. This is useful for analyzing the performance of SQL statements which modify the database such that the changes will be discarded by the transaction leaving the database unchanged.

Resources: