explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9D5b

Settings
# exclusive inclusive rows x rows loops node
1. 2.739 8.789 ↑ 89.7 43 1

Nested Loop (cost=1.12..14,962.55 rows=3,856 width=26) (actual time=7.917..8.789 rows=43 loops=1)

  • Join Filter: ((deleted."timestamp" >= br_publish.published_at) AND (all_events."timestamp" >= br_publish.published_at) AND (all_events.duty_date <= br_publish.publish_date))
  • Rows Removed by Join Filter: 8771
2. 0.347 1.643 ↑ 18.1 339 1

Nested Loop (cost=1.12..12,160.01 rows=6,123 width=58) (actual time=0.081..1.643 rows=339 loops=1)

3. 0.318 0.318 ↑ 4.0 163 1

Index Only Scan using dty_duty_line_event_deleted_idx on dty_duty_line_event deleted (cost=0.56..227.19 rows=646 width=25) (actual time=0.069..0.318 rows=163 loops=1)

  • Index Cond: ((customer_br_id = 10000108) AND (duty_date_time_begin < '2018-12-01 00:00:00+01'::timestamp with time zone) AND (duty_date_time_end > '2018-11-01 00:00:00+01'::timestamp with time zone) AND (payload_type = 'DutyLineDeleted'::text))
  • Heap Fetches: 0
4. 0.978 0.978 ↑ 2.0 2 163

Index Scan using index_aggregate_identifier_bigint on dty_duty_line_event all_events (cost=0.57..18.43 rows=4 width=42) (actual time=0.004..0.006 rows=2 loops=163)

  • Index Cond: ((duty_line_id)::bigint = (deleted.duty_line_id)::bigint)
5. 2.059 4.407 ↓ 1.5 26 339

Materialize (cost=0.00..701.49 rows=17 width=24) (actual time=0.000..0.013 rows=26 loops=339)

6. 2.348 2.348 ↓ 1.5 26 1

Seq Scan on br_publish (cost=0.00..701.40 rows=17 width=24) (actual time=0.004..2.348 rows=26 loops=1)

  • Filter: (br_id = 10000108)
  • Rows Removed by Filter: 33620