explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oW7E

Settings
# exclusive inclusive rows x rows loops node
1. 0.578 18.496 ↑ 1.0 62 1

Nested Loop Left Join (cost=2,118.05..5,496.90 rows=64 width=726) (actual time=13.571..18.496 rows=62 loops=1)

2. 0.053 17.856 ↑ 1.0 62 1

Hash Left Join (cost=2,109.33..4,425.22 rows=64 width=698) (actual time=13.545..17.856 rows=62 loops=1)

  • Hash Cond: (v.vessel_id = itc_1.vessel_id)
3. 0.252 4.643 ↑ 1.0 62 1

Nested Loop Left Join (cost=35.56..2,351.16 rows=64 width=666) (actual time=0.375..4.643 rows=62 loops=1)

  • Join Filter: (a.asset_id = ass.asset_id)
  • Rows Removed by Join Filter: 1412
4. 0.022 4.231 ↑ 1.2 32 1

Nested Loop Left Join (cost=35.56..2,330.52 rows=38 width=546) (actual time=0.332..4.231 rows=32 loops=1)

5. 0.024 4.065 ↓ 1.3 24 1

Nested Loop Left Join (cost=35.16..2,187.48 rows=19 width=422) (actual time=0.308..4.065 rows=24 loops=1)

6. 0.021 4.041 ↓ 1.3 24 1

Nested Loop Left Join (cost=35.01..2,154.46 rows=19 width=415) (actual time=0.307..4.041 rows=24 loops=1)

7. 0.027 3.996 ↓ 1.3 24 1

Nested Loop Left Join (cost=34.86..2,121.43 rows=19 width=408) (actual time=0.299..3.996 rows=24 loops=1)

8. 0.023 3.945 ↓ 1.3 24 1

Nested Loop Left Join (cost=34.59..2,114.95 rows=19 width=405) (actual time=0.294..3.945 rows=24 loops=1)

9. 0.023 3.922 ↓ 1.3 24 1

Nested Loop Left Join (cost=34.45..2,108.22 rows=19 width=385) (actual time=0.293..3.922 rows=24 loops=1)

10. 0.049 3.875 ↓ 1.3 24 1

Nested Loop Left Join (cost=34.31..2,104.83 rows=19 width=349) (actual time=0.288..3.875 rows=24 loops=1)

11. 0.022 3.730 ↓ 1.3 24 1

Hash Join (cost=34.03..2,092.53 rows=19 width=349) (actual time=0.251..3.730 rows=24 loops=1)

  • Hash Cond: (a.asset_type_id = at.asset_type_id)
12. 0.182 3.698 ↓ 1.3 24 1

Hash Right Join (cost=20.65..2,078.89 rows=19 width=235) (actual time=0.233..3.698 rows=24 loops=1)

  • Hash Cond: (v.asset_id = a.asset_id)
13. 3.316 3.316 ↓ 1.0 1,836 1

Seq Scan on vdb_vessel v (cost=0.00..2,051.35 rows=1,835 width=89) (actual time=0.008..3.316 rows=1,836 loops=1)

14. 0.034 0.200 ↓ 1.3 24 1

Hash (cost=20.42..20.42 rows=19 width=150) (actual time=0.200..0.200 rows=24 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 4kB
15. 0.024 0.166 ↓ 1.3 24 1

Merge Left Join (cost=14.74..20.42 rows=19 width=150) (actual time=0.107..0.166 rows=24 loops=1)

  • Merge Cond: (a.contact_card_id = cc.contact_card_id)
16. 0.032 0.048 ↓ 1.3 24 1

Sort (cost=1.59..1.64 rows=19 width=150) (actual time=0.044..0.048 rows=24 loops=1)

  • Sort Key: a.contact_card_id
  • Sort Method: quicksort Memory: 30kB
17. 0.016 0.016 ↓ 1.3 24 1

Seq Scan on rm_asset a (cost=0.00..1.19 rows=19 width=150) (actual time=0.005..0.016 rows=24 loops=1)

18. 0.094 0.094 ↑ 35.0 55 1

Index Only Scan using pk_cd_contact_card on cd_contact_card cc (cost=0.28..647.47 rows=1,925 width=4) (actual time=0.044..0.094 rows=55 loops=1)

  • Heap Fetches: 55
19. 0.005 0.010 ↑ 30.0 5 1

Hash (cost=11.50..11.50 rows=150 width=122) (actual time=0.010..0.010 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
20. 0.005 0.005 ↑ 30.0 5 1

Seq Scan on rm_asset_type at (cost=0.00..11.50 rows=150 width=122) (actual time=0.005..0.005 rows=5 loops=1)

21. 0.096 0.096 ↓ 0.0 0 24

Index Only Scan using pk_cd_contact_card on cd_contact_card vcc (cost=0.28..0.64 rows=1 width=4) (actual time=0.004..0.004 rows=0 loops=24)

  • Index Cond: (contact_card_id = v.contact_card_id)
  • Heap Fetches: 6
22. 0.024 0.024 ↓ 0.0 0 24

Index Scan using pk_vdb_vessel_type on vdb_vessel_type vt (cost=0.14..0.17 rows=1 width=44) (actual time=0.001..0.001 rows=0 loops=24)

  • Index Cond: (v.vessel_type_id = vessel_type_id)
23. 0.000 0.000 ↓ 0.0 0 24

Index Scan using pk_vdb_vessel_type on vdb_vessel_type vtp (cost=0.14..0.34 rows=1 width=28) (actual time=0.000..0.000 rows=0 loops=24)

  • Index Cond: (vt.parent_vessel_type_id = vessel_type_id)
24. 0.024 0.024 ↓ 0.0 0 24

Index Scan using pk_ovs_country on ovs_country c (cost=0.27..0.33 rows=1 width=7) (actual time=0.001..0.001 rows=0 loops=24)

  • Index Cond: (v.country_id = country_id)
25. 0.024 0.024 ↓ 0.0 0 24

Index Scan using pk_ovs_file on ovs_file fvt (cost=0.15..1.73 rows=1 width=11) (actual time=0.001..0.001 rows=0 loops=24)

  • Index Cond: (vt.image_id = file_id)
26. 0.000 0.000 ↓ 0.0 0 24

Index Scan using pk_ovs_file on ovs_file fvtp (cost=0.15..1.73 rows=1 width=11) (actual time=0.000..0.000 rows=0 loops=24)

  • Index Cond: (vtp.image_id = file_id)
27. 0.144 0.144 ↑ 2.0 1 24

Index Scan using pk_vdb_vessel_search on vdb_vessel_search vs (cost=0.41..7.51 rows=2 width=128) (actual time=0.004..0.006 rows=1 loops=24)

  • Index Cond: (vessel_id = v.vessel_id)
28. 0.139 0.160 ↓ 1.4 46 32

Materialize (cost=0.00..2.48 rows=32 width=124) (actual time=0.000..0.005 rows=46 loops=32)

29. 0.021 0.021 ↓ 1.4 46 1

Seq Scan on rm_asset_search ass (cost=0.00..2.32 rows=32 width=124) (actual time=0.006..0.021 rows=46 loops=1)

30. 0.815 13.160 ↓ 8.0 1,725 1

Hash (cost=2,071.07..2,071.07 rows=216 width=36) (actual time=13.160..13.160 rows=1,725 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 115kB
31. 1.757 12.345 ↓ 8.0 1,725 1

Nested Loop (cost=1,999.32..2,071.07 rows=216 width=36) (actual time=4.562..12.345 rows=1,725 loops=1)

32. 0.313 5.410 ↓ 1,726.0 1,726 1

Nested Loop (cost=1,999.04..2,067.63 rows=1 width=20) (actual time=4.547..5.410 rows=1,726 loops=1)

33. 0.027 0.027 ↑ 1.0 1 1

Seq Scan on ovs_configuration cfg (cost=0.00..3.36 rows=1 width=0) (actual time=0.009..0.027 rows=1 loops=1)

  • Filter: ((property)::text = 'imtTrafficMinutes'::text)
  • Rows Removed by Filter: 108
34. 2.353 5.070 ↑ 1.3 1,726 1

HashAggregate (cost=1,999.04..2,020.78 rows=2,174 width=20) (actual time=4.537..5.070 rows=1,726 loops=1)

35. 2.717 2.717 ↑ 1.0 2,174 1

Seq Scan on imt_traffic_current itci (cost=0.00..1,982.74 rows=2,174 width=20) (actual time=0.004..2.717 rows=2,174 loops=1)

36. 5.178 5.178 ↑ 1.0 1 1,726

Index Scan using uk_imttc_01 on imt_traffic_current itc_1 (cost=0.28..3.43 rows=1 width=52) (actual time=0.003..0.003 rows=1 loops=1,726)

  • Index Cond: (vessel_id = itci.vessel_id)
  • Filter: (((max(itci.timestamp_position_raw)) = timestamp_position_raw) AND ((min(itci.change_datetime)) = change_datetime))
37. 0.000 0.062 ↑ 1.0 1 62

Index Scan using pk_imt_traffic_current on imt_traffic_current itc (cost=8.72..16.73 rows=1 width=36) (actual time=0.001..0.001 rows=1 loops=62)

  • Index Cond: (traffic_current_id = (SubPlan 1))
38.          

SubPlan (for Index Scan)

39. 0.000 0.372 ↑ 1.0 1 62

Limit (cost=8.43..8.44 rows=1 width=12) (actual time=0.006..0.006 rows=1 loops=62)

40. 0.248 0.372 ↑ 1.0 1 62

Sort (cost=8.43..8.44 rows=1 width=12) (actual time=0.006..0.006 rows=1 loops=62)

  • Sort Key: itch.timestamp_position_raw
  • Sort Method: quicksort Memory: 25kB
41. 0.124 0.124 ↑ 1.0 1 62

Index Scan using idx_imttc_09 on imt_traffic_current itch (cost=0.41..8.42 rows=1 width=12) (actual time=0.002..0.002 rows=1 loops=62)

  • Index Cond: (traffic_entity_id = a.traffic_entity_id)
42. 0.000 0.372 ↑ 1.0 1 62

Limit (cost=8.43..8.44 rows=1 width=12) (actual time=0.006..0.006 rows=1 loops=62)

43. 0.248 0.372 ↑ 1.0 1 62

Sort (cost=8.43..8.44 rows=1 width=12) (actual time=0.006..0.006 rows=1 loops=62)

  • Sort Key: itch.timestamp_position_raw
  • Sort Method: quicksort Memory: 25kB
44. 0.124 0.124 ↑ 1.0 1 62

Index Scan using idx_imttc_09 on imt_traffic_current itch (cost=0.41..8.42 rows=1 width=12) (actual time=0.002..0.002 rows=1 loops=62)

  • Index Cond: (traffic_entity_id = a.traffic_entity_id)
Total runtime : 19.024 ms