explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CJO6

Settings
# exclusive inclusive rows x rows loops node
1. 59.940 232,574.153 ↓ 2.0 1,835 1

Nested Loop Left Join (cost=288.09..31,164,349.03 rows=928 width=42) (actual time=160.647..232,574.153 rows=1,835 loops=1)

  • Join Filter: (call_tech.id_tech = technika.id)
  • Rows Removed by Join Filter: 311549
  • Filter: ((technika.is_brigade = 1::numeric) OR (technika.is_brigade IS NULL))
  • Rows Removed by Filter: 1745
2. 7.987 232,496.313 ↓ 1.8 3,580 1

Nested Loop Left Join (cost=285.04..31,161,344.87 rows=1,944 width=47) (actual time=160.446..232,496.313 rows=3,580 loops=1)

3. 274.201 232,458.966 ↓ 1.2 1,835 1

Nested Loop Left Join (cost=284.62..31,149,717.19 rows=1,551 width=48) (actual time=160.426..232,458.966 rows=1,835 loops=1)

  • Join Filter: (call_event.id_rank = t3.id)
  • Rows Removed by Join Filter: 1697375
4. 2,190.966 232,096.685 ↓ 1.2 1,835 1

Nested Loop Left Join (cost=213.93..31,126,762.26 rows=1,551 width=53) (actual time=155.973..232,096.685 rows=1,835 loops=1)

  • Join Filter: (ttfc.id_call = call_event.id)
  • Rows Removed by Join Filter: 13529393
5. 2,310.427 229,272.644 ↓ 1.2 1,835 1

Nested Loop Left Join (cost=30.59..30,947,800.79 rows=1,551 width=53) (actual time=147.718..229,272.644 rows=1,835 loops=1)

  • Join Filter: (ttlf.id = call_event.id)
  • Rows Removed by Join Filter: 14292748
6. 12.645 226,279.597 ↓ 1.2 1,835 1

Nested Loop Left Join (cost=30.31..30,758,711.40 rows=1,551 width=53) (actual time=138.574..226,279.597 rows=1,835 loops=1)

7. 9.185 226,230.252 ↓ 1.2 1,835 1

Nested Loop Left Join (cost=29.89..30,746,876.20 rows=1,551 width=53) (actual time=138.530..226,230.252 rows=1,835 loops=1)

8. 7.772 7.772 ↓ 1.2 1,835 1

Index Scan using call_event_time_reg_reg_no_call_numb_wrong_call_index on call_event (cost=0.42..4,923.54 rows=1,551 width=29) (actual time=0.011..7.772 rows=1,835 loops=1)

  • Index Cond: ((time_reg >= '2019-02-01 00:00:00'::timestamp without time zone) AND (time_reg <= '2019-02-05 00:00:00'::timestamp without time zone) AND (call_numb > 0::numeric))
9. 114,164.525 226,213.295 ↑ 1.0 1 1,835

Nested Loop Left Join (cost=29.46..19,820.72 rows=1 width=40) (actual time=123.271..123.277 rows=1 loops=1,835)

  • Join Filter: (apod.id_instr_data_after = isdb.id)
  • Rows Removed by Join Filter: 428372
10. 16.515 310.115 ↑ 1.0 1 1,835

Nested Loop Left Join (cost=29.46..38.08 rows=1 width=52) (actual time=0.162..0.169 rows=1 loops=1,835)

11. 60.555 275.250 ↑ 1.0 1 1,835

Hash Right Join (cost=29.04..31.19 rows=1 width=52) (actual time=0.146..0.150 rows=1 loops=1,835)

  • Hash Cond: (cn1.id_tbl = t1.id)
12. 12.845 12.845 ↓ 1.0 85 1,835

Seq Scan on call_name cn1 (cost=0.00..1.83 rows=83 width=4) (actual time=0.002..0.007 rows=85 loops=1,835)

13. 3.670 201.850 ↑ 1.0 1 1,835

Hash (cost=29.03..29.03 rows=1 width=57) (actual time=0.110..0.110 rows=1 loops=1,835)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
14. 9.175 198.180 ↑ 1.0 1 1,835

Nested Loop Left Join (cost=24.85..29.03 rows=1 width=57) (actual time=0.105..0.108 rows=1 loops=1,835)

15. 38.535 189.005 ↑ 1.0 1 1,835

Hash Right Join (cost=24.71..26.86 rows=1 width=59) (actual time=0.100..0.103 rows=1 loops=1,835)

  • Hash Cond: (cn.id_tbl = t.id)
16. 20.185 20.185 ↓ 1.0 85 1,835

Seq Scan on call_name cn (cost=0.00..1.83 rows=83 width=4) (actual time=0.006..0.011 rows=85 loops=1,835)

17. 3.670 130.285 ↑ 1.0 1 1,835

Hash (cost=24.69..24.69 rows=1 width=64) (actual time=0.071..0.071 rows=1 loops=1,835)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
18. 5.505 126.615 ↑ 1.0 1 1,835

Nested Loop Left Join (cost=15.02..24.69 rows=1 width=64) (actual time=0.066..0.069 rows=1 loops=1,835)

19. 14.680 119.275 ↑ 1.0 1 1,835

Nested Loop Left Join (cost=14.88..22.52 rows=1 width=79) (actual time=0.061..0.065 rows=1 loops=1,835)

20. 22.020 88.080 ↑ 1.0 1 1,835

Hash Right Join (cost=14.46..15.66 rows=1 width=73) (actual time=0.045..0.048 rows=1 loops=1,835)

  • Hash Cond: (aac.id = apa.id_accident_cause)
21. 5.505 5.505 ↑ 1.0 14 1,835

Seq Scan on arm03_accident_cause aac (cost=0.00..1.14 rows=14 width=39) (actual time=0.002..0.003 rows=14 loops=1,835)

22. 5.505 60.555 ↑ 1.0 1 1,835

Hash (cost=14.44..14.44 rows=1 width=44) (actual time=0.033..0.033 rows=1 loops=1,835)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
23. 12.845 55.050 ↑ 1.0 1 1,835

Nested Loop Left Join (cost=0.84..14.44 rows=1 width=44) (actual time=0.029..0.030 rows=1 loops=1,835)

24. 23.855 23.855 ↑ 1.0 1 1,835

Index Scan using arm03_call_call_idx on arm03_call ac (cost=0.42..7.57 rows=1 width=35) (actual time=0.013..0.013 rows=1 loops=1,835)

  • Index Cond: (call_event.id = id_call)
25. 18.350 18.350 ↑ 1.0 1 1,835

Index Scan using arm03_patient_assistance_sys_c0055818 on arm03_patient_assistance apa (cost=0.42..6.86 rows=1 width=128) (actual time=0.010..0.010 rows=1 loops=1,835)

  • Index Cond: (ac.id_call = id)
26. 16.515 16.515 ↑ 1.0 1 1,835

Index Scan using arm03_patient_objective_data_sys_c0055828 on arm03_patient_objective_data apod (cost=0.42..6.86 rows=1 width=22) (actual time=0.009..0.009 rows=1 loops=1,835)

  • Index Cond: (apa.id = id)
27. 1.835 1.835 ↓ 0.0 0 1,835

Index Only Scan using technika_sys_c0042500 on technika t (cost=0.14..2.16 rows=1 width=5) (actual time=0.001..0.001 rows=0 loops=1,835)

  • Index Cond: (id = apa.id_spec_brigade)
  • Heap Fetches: 0
28. 0.000 0.000 ↓ 0.0 0 1,835

Index Only Scan using technika_sys_c0042500 on technika t1 (cost=0.14..2.16 rows=1 width=5) (actual time=0.000..0.000 rows=0 loops=1,835)

  • Index Cond: (id = apa.id_to_help_call)
  • Heap Fetches: 0
29. 18.350 18.350 ↑ 1.0 1 1,835

Index Only Scan using arm03_patient_instr_study_data_sys_c0055826 on arm03_patient_instr_study_data isdb (cost=0.42..6.87 rows=1 width=6) (actual time=0.008..0.010 rows=1 loops=1,835)

  • Index Cond: (id = apod.id_instr_data_before)
  • Heap Fetches: 1745
30. 111,738.655 111,738.655 ↑ 1.0 428,372 1,835

Seq Scan on arm03_patient_instr_study_data isda (cost=0.00..14,420.62 rows=428,962 width=0) (actual time=0.005..60.893 rows=428,372 loops=1,835)

31. 36.700 36.700 ↑ 2.0 1 1,835

Index Scan using ref_call_event_sound_idx on ref_call_event_sound rces (cost=0.42..7.61 rows=2 width=6) (actual time=0.019..0.020 rows=1 loops=1,835)

  • Index Cond: (call_event.id = id_call_event)
  • Filter: (is_out = 0::numeric)
  • Rows Removed by Filter: 0
32. 676.400 682.620 ↑ 1.0 7,789 1,835

Materialize (cost=0.28..546.83 rows=8,105 width=6) (actual time=0.001..0.372 rows=7,789 loops=1,835)

33. 0.872 6.220 ↑ 1.0 7,789 1

Subquery Scan on ttlf (cost=0.28..506.30 rows=8,105 width=6) (actual time=0.020..6.220 rows=7,789 loops=1)

34. 3.668 5.348 ↑ 1.0 7,789 1

GroupAggregate (cost=0.28..425.25 rows=8,105 width=16) (actual time=0.018..5.348 rows=7,789 loops=1)

35. 1.680 1.680 ↑ 1.0 7,838 1

Index Scan using linked_event_id_index on linked_event le (cost=0.28..283.03 rows=8,156 width=16) (actual time=0.010..1.680 rows=7,838 loops=1)

36. 627.375 633.075 ↑ 1.0 7,373 1,835

Materialize (cost=183.34..375.26 rows=7,677 width=7) (actual time=0.002..0.345 rows=7,373 loops=1,835)

37. 0.831 5.700 ↑ 1.0 7,373 1

Subquery Scan on ttfc (cost=183.34..336.88 rows=7,677 width=7) (actual time=3.608..5.700 rows=7,373 loops=1)

38. 4.229 4.869 ↑ 1.0 7,373 1

HashAggregate (cost=183.34..260.11 rows=7,677 width=12) (actual time=3.607..4.869 rows=7,373 loops=1)

39. 0.640 0.640 ↑ 1.0 7,838 1

Seq Scan on linked_event le_1 (cost=0.00..142.56 rows=8,156 width=12) (actual time=0.005..0.640 rows=7,838 loops=1)

40. 83.702 88.080 ↑ 1.1 926 1,835

Materialize (cost=70.69..87.89 rows=983 width=5) (actual time=0.002..0.048 rows=926 loops=1,835)

41. 0.126 4.378 ↑ 1.1 926 1

Subquery Scan on t3 (cost=70.69..82.98 rows=983 width=5) (actual time=4.190..4.378 rows=926 loops=1)

42. 4.095 4.252 ↑ 1.1 926 1

Sort (cost=70.69..73.15 rows=983 width=61) (actual time=4.189..4.252 rows=926 loops=1)

  • Sort Key: rank.event_type_id, rank.prioritet, rank.caption
  • Sort Method: quicksort Memory: 139kB
43. 0.157 0.157 ↑ 1.1 926 1

Seq Scan on rank (cost=0.00..21.83 rows=983 width=61) (actual time=0.005..0.157 rows=926 loops=1)

44. 29.360 29.360 ↑ 1.0 2 1,835

Index Scan using call_tech_idx on call_tech (cost=0.42..7.48 rows=2 width=26) (actual time=0.015..0.016 rows=2 loops=1,835)

  • Index Cond: (id_call = call_event.id)
  • Filter: ((tech_deleted <> 1::numeric) OR (tech_deleted IS NULL))
  • Rows Removed by Filter: 0
45. 17.752 17.900 ↑ 1.0 88 3,580

Materialize (cost=3.05..10.62 rows=88 width=8) (actual time=0.000..0.005 rows=88 loops=3,580)

46. 0.069 0.148 ↑ 1.0 88 1

Hash Left Join (cost=3.05..10.18 rows=88 width=8) (actual time=0.074..0.148 rows=88 loops=1)

  • Hash Cond: (technika.id = cn_1.id_tbl)
47. 0.028 0.028 ↑ 1.0 88 1

Seq Scan on technika (cost=0.00..5.88 rows=88 width=22) (actual time=0.004..0.028 rows=88 loops=1)

48. 0.024 0.051 ↓ 1.0 84 1

Hash (cost=2.04..2.04 rows=81 width=4) (actual time=0.051..0.051 rows=84 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 4kB
49. 0.027 0.027 ↓ 1.0 84 1

Seq Scan on call_name cn_1 (cost=0.00..2.04 rows=81 width=4) (actual time=0.012..0.027 rows=84 loops=1)

  • Filter: ((table_name)::text = 'TECHNIKA'::text)
  • Rows Removed by Filter: 1