explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yAnd

Settings
# exclusive inclusive rows x rows loops node
1. 5.355 5.658 ↑ 61.5 21 1

Gather (cost=1,140.18..1,272.61 rows=1,292 width=531) (actual time=4.654..5.658 rows=21 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
  • Single Copy: true
2. 0.020 0.303 ↑ 61.5 21 1 / 2

Sort (cost=140.18..143.41 rows=1,292 width=531) (actual time=0.605..0.606 rows=21 loops=1)

  • Sort Key: offences.id
  • Worker 0: Sort Method: quicksort Memory: 31kB
3. 0.119 0.283 ↑ 61.5 21 1 / 2

Merge Join (cost=0.86..73.41 rows=1,292 width=531) (actual time=0.114..0.566 rows=21 loops=1)

  • Merge Cond: (offences_penalty_extended.id = extended_offences_fine.offence_id)
  • -> Index Scan using idx_extended_offences_fine_offence_id on extended_offences_fine (cost=0.43..51796.26 rows=2283638 width=40) (actu
4. 0.164 0.164 ↓ 21.0 21 1 / 2

Nested Loop (cost=0.43..53.99 rows=1 width=495) (actual time=0.069..0.328 rows=21 loops=1)

  • -> Index Scan using offences_penalty_extended_pkey on offences_penalty_extended (cost=0.14..13.36 rows=19 width=239) (actual ti
  • Filter: ((traffic_police = 0) AND ((state)::text = 'UK'::text))
  • Rows Removed by Filter: 179
  • -> Index Scan using offences_copy_pkey on offences (cost=0.28..2.14 rows=1 width=260) (actual time=0.007..0.007 rows=1 loops=23
  • Index Cond: (id = offences_penalty_extended.offence_id)
  • Filter: ((traffic_police = 0) AND ((state)::text = 'UK'::text))
Planning time : 1.817 ms
Execution time : 5.777 ms