explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rFV

Settings
# exclusive inclusive rows x rows loops node
1. 58.367 4,984.853 ↓ 19.7 39,430 1

Nested Loop Left Join (cost=84.42..65,804.59 rows=2,001 width=10,762) (actual time=1.569..4,984.853 rows=39,430 loops=1)

  • Buffers: shared hit=9586519 read=26054
2. 46.575 4,847.626 ↓ 19.7 39,430 1

Hash Left Join (cost=83.71..52,534.71 rows=2,001 width=10,338) (actual time=1.544..4,847.626 rows=39,430 loops=1)

  • Hash Cond: (ssr.id = ssr1.service_id)
  • Buffers: shared hit=9487103 read=25955
3. 58.429 4,800.527 ↓ 19.7 39,386 1

Nested Loop Left Join (cost=69.40..52,487.88 rows=2,001 width=10,166) (actual time=1.011..4,800.527 rows=39,386 loops=1)

  • Join Filter: (ssr.duration_measure_unit_id = ssdu.id)
  • Rows Removed by Join Filter: 118002
  • Buffers: shared hit=9487099 read=25954
4. 39.818 4,742.098 ↓ 19.7 39,386 1

Hash Left Join (cost=68.34..52,388.93 rows=2,001 width=9,475) (actual time=0.889..4,742.098 rows=39,386 loops=1)

  • Hash Cond: (rss.type_id = stv.id)
  • Buffers: shared hit=9487098 read=25950
5. 36.437 4,702.266 ↓ 19.7 39,386 1

Nested Loop Left Join (cost=66.91..52,359.99 rows=2,001 width=8,109) (actual time=0.825..4,702.266 rows=39,386 loops=1)

  • Buffers: shared hit=9487097 read=25950
6. 54.426 4,626.443 ↓ 19.7 39,386 1

Nested Loop Left Join (cost=66.63..51,744.57 rows=2,001 width=8,008) (actual time=0.796..4,626.443 rows=39,386 loops=1)

  • Buffers: shared hit=9444581 read=25925
7. 56.972 4,532.631 ↓ 19.7 39,386 1

Nested Loop Left Join (cost=66.49..51,409.28 rows=2,001 width=6,062) (actual time=0.785..4,532.631 rows=39,386 loops=1)

  • Buffers: shared hit=9368791 read=25925
8. 35.824 4,436.273 ↓ 19.7 39,386 1

Hash Left Join (cost=66.20..50,781.78 rows=2,001 width=5,689) (actual time=0.780..4,436.273 rows=39,386 loops=1)

  • Hash Cond: (rss.id = sc.complex_id)
  • Filter: CASE WHEN (ssr.complex_srv_id IS NOT NULL) THEN (sc.service_id = ss.id) ELSE true END
  • Rows Removed by Filter: 260
  • Buffers: shared hit=9279698 read=25841
9. 40.092 4,400.278 ↓ 9.8 39,391 1

Nested Loop Left Join (cost=49.89..50,700.39 rows=4,002 width=5,597) (actual time=0.599..4,400.278 rows=39,391 loops=1)

  • Buffers: shared hit=9279696 read=25838
10. 39.461 4,360.186 ↓ 9.8 39,391 1

Nested Loop Left Join (cost=49.46..48,744.96 rows=4,002 width=4,830) (actual time=0.594..4,360.186 rows=39,391 loops=1)

  • Buffers: shared hit=9279060 read=25838
11. 36.454 4,320.725 ↓ 9.8 39,391 1

Hash Left Join (cost=49.03..43,520.50 rows=4,002 width=4,670) (actual time=0.588..4,320.725 rows=39,391 loops=1)

  • Hash Cond: (ss.type_id = st.id)
  • Buffers: shared hit=9278424 read=25838
12. 38.566 4,284.241 ↓ 9.8 39,391 1

Nested Loop Left Join (cost=47.60..43,464.05 rows=4,002 width=3,304) (actual time=0.534..4,284.241 rows=39,391 loops=1)

  • Buffers: shared hit=9278424 read=25837
13. 41.180 4,166.893 ↓ 9.8 39,391 1

Hash Left Join (cost=47.31..41,905.78 rows=4,002 width=2,420) (actual time=0.522..4,166.893 rows=39,391 loops=1)

  • Hash Cond: (srg.responsible_id = epr.employee_position_id)
  • Buffers: shared hit=9159998 read=25817
14. 39.703 4,125.280 ↓ 9.8 39,391 1

Merge Join (cost=9.38..41,813.74 rows=4,002 width=2,364) (actual time=0.068..4,125.280 rows=39,391 loops=1)

  • Merge Cond: (msr.step_id = ms.id)
  • Buffers: shared hit=9159996 read=25810
15. 10.518 4,056.298 ↑ 4.6 39,392 1

Nested Loop Left Join (cost=1.72..1,767,503.02 rows=182,998 width=2,186) (actual time=0.055..4,056.298 rows=39,392 loops=1)

  • Buffers: shared hit=9130807 read=25686
16. 36.924 3,927.604 ↑ 4.6 39,392 1

Nested Loop Left Join (cost=1.29..1,599,641.90 rows=182,998 width=1,419) (actual time=0.045..3,927.604 rows=39,392 loops=1)

  • Buffers: shared hit=8973567 read=25515
17. 1,150.548 3,811.896 ↑ 4.6 39,392 1

Nested Loop (cost=0.86..1,343,161.83 rows=182,998 width=777) (actual time=0.035..3,811.896 rows=39,392 loops=1)

  • Buffers: shared hit=8821852 read=25093
18. 557.238 557.238 ↑ 1.1 2,104,110 1

Index Scan using md_srv_rendered_step_id_idx on md_srv_rendered msr (cost=0.43..101,906.06 rows=2,355,182 width=617) (actual time=0.018..557.238 rows=2,104,110 loops=1)

  • Buffers: shared hit=394080 read=24935
19. 2,104.110 2,104.110 ↓ 0.0 0 2,104,110

Index Scan using sr_srv_rendered_pkey on sr_srv_rendered ssr (cost=0.43..0.52 rows=1 width=160) (actual time=0.001..0.001 rows=0 loops=2,104,110)

  • Index Cond: (id = msr.id)
  • Filter: is_rendered
  • Rows Removed by Filter: 1
  • Buffers: shared hit=8427772 read=158
20. 78.784 78.784 ↑ 1.0 1 39,392

Index Scan using sr_res_group_pkey on sr_res_group srg (cost=0.43..1.39 rows=1 width=642) (actual time=0.002..0.002 rows=1 loops=39,392)

  • Index Cond: (id = ssr.res_group_id)
  • Buffers: shared hit=151715 read=422
21. 118.176 118.176 ↑ 1.0 1 39,392

Index Scan using sr_service_service_id on sr_service ss (cost=0.42..0.91 rows=1 width=767) (actual time=0.002..0.003 rows=1 loops=39,392)

  • Index Cond: (ssr.service_id = id)
  • Buffers: shared hit=157240 read=171
22. 29.279 29.279 ↓ 1.1 49,479 1

Index Scan using mc_step_pkey on mc_step ms (cost=0.29..3,023.52 rows=45,525 width=178) (actual time=0.008..29.279 rows=49,479 loops=1)

  • Buffers: shared hit=29189 read=124
23. 0.217 0.433 ↑ 1.0 1,285 1

Hash (cost=21.86..21.86 rows=1,286 width=56) (actual time=0.433..0.433 rows=1,285 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 90kB
  • Buffers: shared hit=2 read=7
24. 0.216 0.216 ↑ 1.0 1,286 1

Seq Scan on pim_employee_position_resource epr (cost=0.00..21.86 rows=1,286 width=56) (actual time=0.007..0.216 rows=1,286 loops=1)

  • Buffers: shared hit=2 read=7
25. 78.782 78.782 ↑ 1.0 1 39,391

Index Scan using mc_case_pkey on mc_case mc (cost=0.29..0.38 rows=1 width=884) (actual time=0.002..0.002 rows=1 loops=39,391)

  • Index Cond: (ms.case_id = id)
  • Buffers: shared hit=118426 read=20
26. 0.009 0.030 ↑ 1.0 19 1

Hash (cost=1.19..1.19 rows=19 width=1,366) (actual time=0.030..0.030 rows=19 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared read=1
27. 0.021 0.021 ↑ 1.0 19 1

Seq Scan on sr_srv_type st (cost=0.00..1.19 rows=19 width=1,366) (actual time=0.018..0.021 rows=19 loops=1)

  • Buffers: shared read=1
28. 0.000 0.000 ↓ 0.0 0 39,391

Index Scan using sr_srv_rendered_pkey on sr_srv_rendered srsr (cost=0.43..1.30 rows=1 width=160) (actual time=0.000..0.000 rows=0 loops=39,391)

  • Index Cond: (id = ssr.complex_srv_id)
  • Buffers: shared hit=636
29. 0.000 0.000 ↓ 0.0 0 39,391

Index Scan using sr_service_service_id on sr_service rss (cost=0.42..0.48 rows=1 width=767) (actual time=0.000..0.000 rows=0 loops=39,391)

  • Index Cond: (id = srsr.service_id)
  • Buffers: shared hit=636
30. 0.085 0.171 ↑ 1.0 503 1

Hash (cost=10.03..10.03 rows=503 width=92) (actual time=0.171..0.171 rows=503 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 46kB
  • Buffers: shared hit=2 read=3
31. 0.086 0.086 ↑ 1.0 503 1

Seq Scan on sr_srv_composition sc (cost=0.00..10.03 rows=503 width=92) (actual time=0.006..0.086 rows=503 loops=1)

  • Buffers: shared hit=2 read=3
32. 39.386 39.386 ↑ 1.0 1 39,386

Index Scan using md_diagnosis_pkey on md_diagnosis md (cost=0.29..0.30 rows=1 width=373) (actual time=0.001..0.001 rows=1 loops=39,386)

  • Index Cond: (msr.diagnosis_id = id)
  • Buffers: shared hit=89093 read=84
33. 39.386 39.386 ↑ 1.0 1 39,386

Index Scan using fin_funding_source_type_pkey on fin_funding_source_type ffst (cost=0.14..0.16 rows=1 width=1,946) (actual time=0.001..0.001 rows=1 loops=39,386)

  • Index Cond: (ssr.funding_id = id)
  • Buffers: shared hit=75790
34. 39.386 39.386 ↓ 0.0 0 39,386

Index Scan using pim_employee_position_pkey on pim_employee_position pep (cost=0.28..0.30 rows=1 width=101) (actual time=0.001..0.001 rows=0 loops=39,386)

  • Index Cond: (srg.responsible_id = id)
  • Buffers: shared hit=42516 read=25
35. 0.006 0.014 ↑ 1.0 19 1

Hash (cost=1.19..1.19 rows=19 width=1,366) (actual time=0.014..0.014 rows=19 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=1
36. 0.008 0.008 ↑ 1.0 19 1

Seq Scan on sr_srv_type stv (cost=0.00..1.19 rows=19 width=1,366) (actual time=0.006..0.008 rows=19 loops=1)

  • Buffers: shared hit=1
37. 0.000 0.000 ↑ 1.0 3 39,386

Materialize (cost=1.07..8.91 rows=3 width=691) (actual time=0.000..0.000 rows=3 loops=39,386)

  • Buffers: shared hit=1 read=4
38. 0.040 0.111 ↑ 1.0 3 1

Hash Right Join (cost=1.07..8.89 rows=3 width=691) (actual time=0.046..0.111 rows=3 loops=1)

  • Hash Cond: (cm.id = ssdu.measure_id)
  • Buffers: shared hit=1 read=4
39. 0.065 0.065 ↑ 1.0 276 1

Seq Scan on cmn_measure cm (cost=0.00..6.76 rows=276 width=539) (actual time=0.020..0.065 rows=276 loops=1)

  • Buffers: shared read=4
40. 0.002 0.006 ↑ 1.0 3 1

Hash (cost=1.03..1.03 rows=3 width=152) (actual time=0.006..0.006 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
41. 0.004 0.004 ↑ 1.0 3 1

Seq Scan on sr_srv_duration_unit ssdu (cost=0.00..1.03 rows=3 width=152) (actual time=0.003..0.004 rows=3 loops=1)

  • Buffers: shared hit=1
42. 0.135 0.524 ↑ 1.0 223 1

Hash (cost=11.52..11.52 rows=223 width=172) (actual time=0.524..0.524 rows=223 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 52kB
  • Buffers: shared hit=4 read=1
43. 0.115 0.389 ↑ 1.0 223 1

Hash Left Join (cost=2.37..11.52 rows=223 width=172) (actual time=0.034..0.389 rows=223 loops=1)

  • Hash Cond: (ssr1.result_type_id = ssrt.id)
  • Buffers: shared hit=4 read=1
44. 0.250 0.250 ↑ 1.0 223 1

Seq Scan on sr_srv_result ssr1 (cost=0.00..6.23 rows=223 width=80) (actual time=0.004..0.250 rows=223 loops=1)

  • Buffers: shared hit=3 read=1
45. 0.016 0.024 ↑ 1.0 61 1

Hash (cost=1.61..1.61 rows=61 width=92) (actual time=0.024..0.024 rows=61 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
  • Buffers: shared hit=1
46. 0.008 0.008 ↑ 1.0 61 1

Seq Scan on sr_srv_result_type ssrt (cost=0.00..1.61 rows=61 width=92) (actual time=0.005..0.008 rows=61 loops=1)

  • Buffers: shared hit=1
47. 0.000 78.860 ↓ 0.0 0 39,430

Nested Loop Left Join (cost=0.71..6.62 rows=1 width=424) (actual time=0.002..0.002 rows=0 loops=39,430)

  • Buffers: shared hit=99416 read=99
48. 39.430 39.430 ↓ 0.0 0 39,430

Index Scan using pim_employee_pkey on pim_employee pe (cost=0.29..0.49 rows=1 width=90) (actual time=0.001..0.001 rows=0 loops=39,430)

  • Index Cond: (pep.employee_id = id)
  • Buffers: shared hit=42647 read=1
49. 42.645 42.645 ↑ 1.0 1 14,215

Index Scan using pim_individual_pkey on pim_individual pi (cost=0.43..6.12 rows=1 width=334) (actual time=0.002..0.003 rows=1 loops=14,215)

  • Index Cond: (pe.individual_id = id)
  • Buffers: shared hit=56769 read=98
Planning time : 68.490 ms
Execution time : 4,990.248 ms