explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tagW : Optimization for: Optimization for: plan #XcBD; plan #mue

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.004 202.742 ↑ 4.0 1 1

Limit (cost=60,440.46..60,440.47 rows=4 width=187) (actual time=202.741..202.742 rows=1 loops=1)

2. 0.015 202.738 ↑ 4.0 1 1

Sort (cost=60,440.46..60,440.47 rows=4 width=187) (actual time=202.738..202.738 rows=1 loops=1)

  • Sort Key: audit.created_on DESC
  • Sort Method: quicksort Memory: 25kB
3. 0.013 202.723 ↑ 4.0 1 1

WindowAgg (cost=1,000.00..60,440.42 rows=4 width=187) (actual time=202.722..202.723 rows=1 loops=1)

4. 0.052 202.710 ↑ 4.0 1 1

Nested Loop (cost=1,000.00..60,440.37 rows=4 width=179) (actual time=202.707..202.710 rows=1 loops=1)

  • Join Filter: ((audit.path)::text = (audit_events.event_url)::text)
  • Rows Removed by Join Filter: 183
5. 0.028 0.028 ↑ 1.0 46 1

Seq Scan on audit_events (cost=0.00..1.46 rows=46 width=131) (actual time=0.022..0.028 rows=46 loops=1)

6. 0.000 202.630 ↑ 5.0 4 46

Materialize (cost=1,000.00..60,425.16 rows=20 width=117) (actual time=3.219..4.405 rows=4 loops=46)

7. 11.180 205.872 ↑ 5.0 4 1

Gather (cost=1,000.00..60,425.06 rows=20 width=117) (actual time=148.070..205.872 rows=4 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
8. 194.692 194.692 ↑ 8.0 1 3 / 3

Parallel Seq Scan on audit (cost=0.00..59,423.06 rows=8 width=117) (actual time=140.452..194.692 rows=1 loops=3)

  • Filter: ((session_id)::text = '1501511747148867466'::text)
  • Rows Removed by Filter: 127,153