explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QYtx

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 2.587 ↑ 1.0 10 1

Limit (cost=1.55..5,633.77 rows=10 width=315) (actual time=0.614..2.587 rows=10 loops=1)

2. 0.060 2.578 ↑ 14,245.2 10 1

Nested Loop Left Join (cost=1.55..80,232,061.68 rows=142,452 width=315) (actual time=0.613..2.578 rows=10 loops=1)

  • Join Filter: (logentryen1_.entry_id = reminders2_.entry_id)
3. 0.013 2.097 ↑ 14,245.2 10 1

Nested Loop (cost=1.27..477,385.05 rows=142,452 width=225) (actual time=0.376..2.097 rows=10 loops=1)

4. 0.031 2.024 ↑ 14,245.2 10 1

Nested Loop (cost=0.85..406,177.40 rows=142,452 width=225) (actual time=0.368..2.024 rows=10 loops=1)

5. 0.145 0.145 ↑ 15,473.4 44 1

Index Scan Backward using idx_loge_26 on log_entry le (cost=0.42..58,261.55 rows=680,828 width=215) (actual time=0.014..0.145 rows=44 loops=1)

  • Filter: ((NOT deleted) AND active AND (centre_id = ANY ('{1,2,3,4}'::integer[])))
6. 1.848 1.848 ↓ 0.0 0 44

Index Scan using pk_log_entry_search on log_entry_search ss (cost=0.42..0.51 rows=1 width=10) (actual time=0.042..0.042 rows=0 loops=44)

  • Index Cond: ((entry_id = le.entry_id) AND ((locale_id)::text = 'en-GB'::text))
  • Filter: (search_string @@ '''dublin'''::tsquery)
  • Rows Removed by Filter: 1
7. 0.060 0.060 ↑ 1.0 1 10

Index Only Scan using pk_log_entry on log_entry logentryen1_ (cost=0.42..0.50 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=10)

  • Index Cond: (entry_id = le.entry_id)
  • Heap Fetches: 10
8. 0.022 0.030 ↓ 0.0 0 10

Materialize (cost=0.28..2.50 rows=1 width=14) (actual time=0.003..0.003 rows=0 loops=10)

9. 0.008 0.008 ↓ 0.0 0 1

Index Scan using uk_ovsr_01 on ovs_reminder reminders2_ (cost=0.28..2.50 rows=1 width=14) (actual time=0.008..0.008 rows=0 loops=1)

  • Index Cond: ((reminder_type = 'REMINDER'::ovs_reminder_type) AND (assigned_to_user_id = 0))
10.          

SubPlan (for Nested Loop Left Join)

11. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_vdb_vessel_history on vdb_vessel_history vh (cost=0.43..2.65 rows=1 width=13) (never executed)

  • Index Cond: (vessel_history_id = le.from_vessel_history_id)
12. 0.000 0.000 ↓ 0.0 0

Index Scan using uk_vdb_vessel_id on vdb_vessel v (cost=0.42..2.64 rows=1 width=9) (never executed)

  • Index Cond: (vessel_id = le.from_vessel_id)
13. 0.063 0.063 ↑ 1.0 1 7

Index Scan using pk_ovs_entity on ovs_entity fe (cost=0.28..2.50 rows=1 width=15) (actual time=0.008..0.009 rows=1 loops=7)

  • Index Cond: (entity_id = le.from_entity_id)
14. 0.008 0.008 ↑ 1.0 1 2

Index Scan using pk_rm_resource on rm_resource r (cost=0.14..2.36 rows=1 width=19) (actual time=0.004..0.004 rows=1 loops=2)

  • Index Cond: (resource_id = le.from_resource_id)
15. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.14..238.53 rows=1 width=32) (never executed)

16. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_rm_resource on rm_resource r_1 (cost=0.14..2.36 rows=1 width=19) (never executed)

  • Index Cond: (resource_id = le.from_resource_id)
17. 0.000 0.000 ↓ 0.0 0

Seq Scan on rm_capability c (cost=0.00..1.33 rows=1 width=118) (never executed)

  • Filter: (capability_id = le.from_capability_id)
18.          

SubPlan (for Nested Loop)

19. 0.000 0.000 ↓ 0.0 0

Seq Scan on ovs_translation t (cost=0.00..234.83 rows=1 width=16) (never executed)

  • Filter: (((locale_id)::text = (ss.locale_id)::text) AND ((key_value)::text = concat('resource.capabilities.', c.code)))
20. 0.010 0.010 ↑ 1.0 1 1

Seq Scan on ovs_centre c_1 (cost=0.00..1.05 rows=1 width=516) (actual time=0.009..0.010 rows=1 loops=1)

  • Filter: (centre_id = le.from_centre_id)
  • Rows Removed by Filter: 3
21. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_ovs_port on ovs_port p (cost=0.14..2.36 rows=1 width=16) (never executed)

  • Index Cond: (port_id = le.from_port_id)
22. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_vdb_vessel_history on vdb_vessel_history vh_1 (cost=0.43..2.65 rows=1 width=13) (never executed)

  • Index Cond: (vessel_history_id = le.to_vessel_history_id)
23. 0.000 0.000 ↓ 0.0 0

Index Scan using uk_vdb_vessel_id on vdb_vessel v_1 (cost=0.42..2.64 rows=1 width=9) (never executed)

  • Index Cond: (vessel_id = le.to_vessel_id)
24. 0.040 0.040 ↑ 1.0 1 10

Index Scan using pk_ovs_entity on ovs_entity e (cost=0.28..2.50 rows=1 width=15) (actual time=0.003..0.004 rows=1 loops=10)

  • Index Cond: (entity_id = le.to_entity_id)
25. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_rm_resource on rm_resource r_2 (cost=0.14..2.36 rows=1 width=19) (never executed)

  • Index Cond: (resource_id = le.to_resource_id)
26. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.14..238.53 rows=1 width=32) (never executed)

27. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_rm_resource on rm_resource r_3 (cost=0.14..2.36 rows=1 width=19) (never executed)

  • Index Cond: (resource_id = le.to_resource_id)
28. 0.000 0.000 ↓ 0.0 0

Seq Scan on rm_capability c_2 (cost=0.00..1.33 rows=1 width=118) (never executed)

  • Filter: (capability_id = le.to_capability_id)
29.          

SubPlan (for Nested Loop)

30. 0.000 0.000 ↓ 0.0 0

Seq Scan on ovs_translation t_1 (cost=0.00..234.83 rows=1 width=16) (never executed)

  • Filter: (((locale_id)::text = (ss.locale_id)::text) AND ((key_value)::text = concat('resource.capabilities.', c_2.code)))
31. 0.000 0.000 ↓ 0.0 0

Seq Scan on ovs_centre c_3 (cost=0.00..1.05 rows=1 width=516) (never executed)

  • Filter: (centre_id = le.to_centre_id)
32. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_ovs_port on ovs_port p_1 (cost=0.14..2.36 rows=1 width=16) (never executed)

  • Index Cond: (port_id = le.to_port_id)
33. 0.012 0.012 ↑ 1.0 1 2

Index Scan using pk_im_incident on im_incident i (cost=0.29..2.50 rows=1 width=12) (actual time=0.006..0.006 rows=1 loops=2)

  • Index Cond: (le.linked_incident_id = incident_id)
34. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_rm_activity on rm_activity a (cost=0.29..2.51 rows=1 width=11) (never executed)

  • Index Cond: (le.linked_activity_id = activity_id)
35. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_msi_record on msi_record m (cost=0.28..2.50 rows=1 width=11) (never executed)

  • Index Cond: (le.linked_record_id = record_id)
36. 0.105 0.210 ↑ 1.0 1 5

Aggregate (cost=10.19..10.20 rows=1 width=32) (actual time=0.042..0.042 rows=1 loops=5)

37. 0.004 0.105 ↑ 1.5 2 5

Nested Loop (cost=0.70..10.18 rows=3 width=11) (actual time=0.016..0.021 rows=2 loops=5)

38. 0.035 0.035 ↑ 1.5 2 5

Index Scan using idx_msire_02 on msi_record_log_entry rl (cost=0.42..2.69 rows=3 width=4) (actual time=0.006..0.007 rows=2 loops=5)

  • Index Cond: (entries_id = le.entry_id)
39. 0.066 0.066 ↑ 1.0 1 11

Index Scan using pk_msi_record on msi_record mr (cost=0.28..2.50 rows=1 width=15) (actual time=0.006..0.006 rows=1 loops=11)

  • Index Cond: (record_id = rl.records_id)
40. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=20.61..20.63 rows=1 width=32) (never executed)

41. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=9.70..20.58 rows=11 width=118) (never executed)

  • Hash Cond: (m_1.message_id = rl_1.messages_id)
42. 0.000 0.000 ↓ 0.0 0

Seq Scan on nt_message m_1 (cost=0.00..10.70 rows=70 width=122) (never executed)

43. 0.000 0.000 ↓ 0.0 0

Hash (cost=9.56..9.56 rows=11 width=4) (never executed)

44. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on nt_message_log_entry rl_1 (cost=1.34..9.56 rows=11 width=4) (never executed)

  • Recheck Cond: (entries_id = le.entry_id)
45. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_ntmle_02 (cost=0.00..1.34 rows=11 width=0) (never executed)

  • Index Cond: (entries_id = le.entry_id)
46. 0.010 0.040 ↑ 1.0 1 5

Aggregate (cost=2.70..2.71 rows=1 width=8) (actual time=0.008..0.008 rows=1 loops=5)

47. 0.030 0.030 ↑ 1.5 2 5

Index Only Scan using idx_msire_02 on msi_record_log_entry rl_2 (cost=0.42..2.69 rows=3 width=0) (actual time=0.006..0.006 rows=2 loops=5)

  • Index Cond: (entries_id = le.entry_id)
  • Heap Fetches: 11
48. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=9.59..9.60 rows=1 width=8) (never executed)

49. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on nt_message_log_entry ml (cost=1.34..9.56 rows=11 width=0) (never executed)

  • Recheck Cond: (entries_id = le.entry_id)
50. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_ntmle_02 (cost=0.00..1.34 rows=11 width=0) (never executed)

  • Index Cond: (entries_id = le.entry_id)
51. 0.008 0.008 ↑ 1.0 1 2

Index Scan using pk_im_incident on im_incident i_1 (cost=0.29..2.51 rows=1 width=32) (actual time=0.004..0.004 rows=1 loops=2)

  • Index Cond: (le.linked_incident_id = incident_id)
52. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_rm_activity on rm_activity a_1 (cost=0.29..2.51 rows=1 width=32) (never executed)

  • Index Cond: (le.linked_activity_id = activity_id)
Planning time : 7.067 ms
Execution time : 3.408 ms