explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Cxp5

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 6.201 ↓ 0.0 0 1

Limit (cost=947.06..947.18 rows=50 width=601) (actual time=6.201..6.201 rows=0 loops=1)

2. 0.007 6.200 ↓ 0.0 0 1

Sort (cost=947.06..947.45 rows=157 width=601) (actual time=6.200..6.200 rows=0 loops=1)

  • Sort Key: (CASE WHEN ((this_.state)::text = 'ERROR'::text) THEN 1 WHEN ((this_.state)::text = 'WARNING'::text) THEN 2 WHEN ((this_.state)::text = 'OK'::text) THEN 3 ELSE 4 END), outstation2_.current_state
  • Sort Method: quicksort Memory: 25kB
3. 0.000 6.193 ↓ 0.0 0 1

Nested Loop (cost=266.02..941.84 rows=157 width=601) (actual time=6.193..6.193 rows=0 loops=1)

4. 0.844 6.193 ↓ 0.0 0 1

Hash Join (cost=265.59..319.07 rows=157 width=601) (actual time=6.193..6.193 rows=0 loops=1)

  • Hash Cond: (this_.intersection_id = intersecti1_.id)
  • Join Filter: (((this_.state)::text = 'OK'::text) OR ((servicemod3_.date_from <= '2019-05-15 08:00:00'::timestamp without time zone) AND ((servicemod3_.date_to >= '2019-05-15 08:00:00'::timestamp without time zone) OR servicemod3_.until_ (...)
  • Rows Removed by Join Filter: 1814
5. 0.362 0.362 ↑ 1.0 1,829 1

Seq Scan on intersection_details this_ (cost=0.00..34.29 rows=1,829 width=594) (actual time=0.005..0.362 rows=1,829 loops=1)

6. 0.472 4.987 ↓ 2.6 1,814 1

Hash (cost=256.77..256.77 rows=705 width=32) (actual time=4.987..4.987 rows=1,814 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 81kB
7. 0.438 4.515 ↓ 2.6 1,814 1

Hash Right Join (cost=223.05..256.77 rows=705 width=32) (actual time=4.081..4.515 rows=1,814 loops=1)

  • Hash Cond: (servicemod3_.outstation_id = outstation2_.id)
8. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on service_mode servicemod3_ (cost=0.00..22.70 rows=1,270 width=25) (actual time=0.001..0.001 rows=0 loops=1)

9. 0.449 4.076 ↓ 2.6 1,814 1

Hash (cost=214.24..214.24 rows=705 width=23) (actual time=4.076..4.076 rows=1,814 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 94kB
10. 0.871 3.627 ↓ 2.6 1,814 1

Hash Right Join (cost=145.15..214.24 rows=705 width=23) (actual time=2.226..3.627 rows=1,814 loops=1)

  • Hash Cond: (outstation2_.id = intersecti1_.outstation_id)
11. 0.539 0.539 ↑ 1.0 1,431 1

Seq Scan on outstation outstation2_ (cost=0.00..58.31 rows=1,431 width=15) (actual time=0.004..0.539 rows=1,431 loops=1)

12. 0.462 2.217 ↓ 2.6 1,814 1

Hash (cost=136.34..136.34 rows=705 width=16) (actual time=2.217..2.217 rows=1,814 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 82kB
13. 1.042 1.755 ↓ 2.6 1,814 1

Hash Join (cost=1.62..136.34 rows=705 width=16) (actual time=0.039..1.755 rows=1,814 loops=1)

  • Hash Cond: (intersecti1_.land_id = land6_.id)
14. 0.685 0.685 ↑ 1.0 1,814 1

Seq Scan on intersection intersecti1_ (cost=0.00..120.86 rows=1,814 width=24) (actual time=0.006..0.685 rows=1,814 loops=1)

  • Filter: ((current_state)::text <> 'REMOVED'::text)
  • Rows Removed by Filter: 15
15. 0.010 0.028 ↓ 2.6 36 1

Hash (cost=1.45..1.45 rows=14 width=8) (actual time=0.028..0.028 rows=36 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
16. 0.018 0.018 ↓ 2.6 36 1

Seq Scan on land land6_ (cost=0.00..1.45 rows=14 width=8) (actual time=0.005..0.018 rows=36 loops=1)

  • Filter: ((path)::text ~~ '%;1;%'::text)
17. 0.000 0.000 ↓ 0.0 0

Index Only Scan using signal_program_data_pkey on signal_program_details currentpro7_ (cost=0.43..3.95 rows=1 width=8) (never executed)

  • Index Cond: (id = this_.current_signal_program_details)
  • Heap Fetches: 0