EXPLAIN (analyze, verbose, costs, timing, buffers, summary)
SELECT *
FROM events
WHERE organization_id = '1' AND type = 'pull_request'
;
-
analyze
will actually run the query -
verbose
will add more information to the plans -
costs
will show information about costs -
timing
will show where you query spent most time at -
buffers
will show informmation about how many buffers this query need to access -
summary
will show summary about this query
can add off to turn off particular ones:
EXPLAIN (analyze, verbose, costs, timing, buffers, summary off)
SELECT *
FROM events
WHERE organization_id = '1' AND type = 'pull_request'
;
Good articles about EXPLAIN
: