EXPLAIN ANALYZE and BUFFERS

EXPLAIN ANALYZE actually executes the query and displays, in addition to the estimates, the real times and row counts. The BUFFERS option shows the pages read from cache or disk. Since it executes the query, you must wrap it in a rolled-back transaction for statements that modify data.

Example

EXPLAIN (ANALYZE, BUFFERS) SELECT * FROM commandes WHERE client_id = 42;

Related concepts

The whole glossary