explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AWKH

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 10,096.088 ↑ 102.0 1 1

Nested Loop Left Join (cost=535,442.37..559,842.06 rows=102 width=8,014) (actual time=9,178.215..10,096.088 rows=1 loops=1)

  • Join Filter: (sr.id = sh_1.id)
  • Buffers: shared hit=2848619, temp read=18995 written=31360
2. 2.358 3,989.117 ↑ 10.0 1 1

Hash Right Join (cost=325,151.80..330,516.41 rows=10 width=2,434) (actual time=3,989.114..3,989.117 rows=1 loops=1)

  • Hash Cond: (sh.id = sh_1.root_id)
  • Buffers: shared hit=2678219
3. 28.323 3,964.784 ↑ 1.2 20,738 1

Hash Left Join (cost=323,476.99..326,274.72 rows=24,740 width=19,745) (actual time=3,927.241..3,964.784 rows=20,738 loops=1)

  • Hash Cond: (sf.filial_id = fil.id)
  • Buffers: shared hit=2678109
4.          

CTE gmssb

5. 6.412 9.143 ↓ 1.0 2,019 1

GroupAggregate (cost=950.14..1,186.64 rows=2,003 width=524) (actual time=2.307..9.143 rows=2,019 loops=1)

  • Group Key: grs_1.ship_id
  • Buffers: shared hit=27
6. 1.212 2.731 ↓ 1.0 3,522 1

Sort (cost=950.14..958.87 rows=3,491 width=19) (actual time=2.285..2.731 rows=3,522 loops=1)

  • Sort Key: grs_1.ship_id
  • Sort Method: quicksort Memory: 262kB
  • Buffers: shared hit=27
7. 1.074 1.519 ↓ 1.0 3,522 1

Hash Join (cost=2.21..744.70 rows=3,491 width=19) (actual time=0.031..1.519 rows=3,522 loops=1)

  • Hash Cond: (grs_1.gmssb_region_id = gr_1.id)
  • Buffers: shared hit=27
8. 0.436 0.436 ↓ 1.0 3,522 1

Seq Scan on gmssb_region_ship grs_1 (cost=0.00..380.30 rows=3,491 width=16) (actual time=0.013..0.436 rows=3,522 loops=1)

  • Buffers: shared hit=26
9. 0.004 0.009 ↑ 1.0 5 1

Hash (cost=1.70..1.70 rows=5 width=19) (actual time=0.009..0.009 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
10. 0.005 0.005 ↑ 1.0 5 1

Seq Scan on gmssb_region gr_1 (cost=0.00..1.70 rows=5 width=19) (actual time=0.004..0.005 rows=5 loops=1)

  • Buffers: shared hit=1
11. 6.009 3,936.158 ↓ 1.0 20,738 1

Merge Left Join (cost=322,241.05..322,519.75 rows=20,356 width=60) (actual time=3,926.926..3,936.158 rows=20,738 loops=1)

  • Merge Cond: (sh.id = gmssb.ship_id)
  • Buffers: shared hit=2677958
12. 18.915 3,919.521 ↓ 1.0 20,738 1

Sort (cost=321,730.61..321,781.50 rows=20,356 width=60) (actual time=3,916.560..3,919.521 rows=20,738 loops=1)

  • Sort Key: sh.id
  • Sort Method: quicksort Memory: 3372kB
  • Buffers: shared hit=2677931
13. 20.131 3,900.606 ↓ 1.0 20,738 1

Hash Left Join (cost=12,103.34..320,273.81 rows=20,356 width=60) (actual time=71.340..3,900.606 rows=20,738 loops=1)

  • Hash Cond: (shm.id = sf.ship_main_id)
  • Buffers: shared hit=2677931
14. 25.683 3,877.818 ↓ 1.0 20,738 1

Nested Loop Left Join (cost=10,883.13..318,165.38 rows=20,356 width=60) (actual time=68.670..3,877.818 rows=20,738 loops=1)

  • Buffers: shared hit=2677882
15. 7.382 222.985 ↓ 1.0 20,738 1

Hash Left Join (cost=10,869.11..28,695.83 rows=20,356 width=68) (actual time=68.622..222.985 rows=20,738 loops=1)

  • Hash Cond: (sh.ship_change_reason_id = cr.id)
  • Buffers: shared hit=40125
16. 12.888 215.577 ↓ 1.0 20,738 1

Hash Join (cost=10,864.56..28,590.74 rows=20,356 width=76) (actual time=68.588..215.577 rows=20,738 loops=1)

  • Hash Cond: (shm.ship_status_id = sst.ship_status_id)
  • Buffers: shared hit=40123
17. 14.728 202.624 ↓ 1.1 26,175 1

Hash Left Join (cost=10,859.11..26,427.56 rows=24,427 width=84) (actual time=68.507..202.624 rows=26,175 loops=1)

  • Hash Cond: (sra.srvreq_answer_type_id = at.id)
  • Buffers: shared hit=40121
18. 26.353 187.857 ↓ 1.1 26,175 1

Merge Left Join (cost=10,855.86..25,111.30 rows=24,427 width=92) (actual time=68.451..187.857 rows=26,175 loops=1)

  • Merge Cond: (sh.id = sr_1.id)
  • Buffers: shared hit=40119
19. 24.091 79.102 ↓ 1.1 26,175 1

Sort (cost=10,855.28..10,916.35 rows=24,427 width=76) (actual time=68.415..79.102 rows=26,175 loops=1)

  • Sort Key: sh.id
  • Sort Method: quicksort Memory: 4408kB
  • Buffers: shared hit=27252
20. 31.103 55.011 ↓ 1.1 26,175 1

Merge Join (cost=0.57..9,075.02 rows=24,427 width=76) (actual time=0.046..55.011 rows=26,175 loops=1)

  • Merge Cond: (shm.id = sh.ship_main_id)
  • Buffers: shared hit=27252
21. 8.264 8.264 ↓ 1.0 15,564 1

Index Scan using pk_ship_main on ship_main shm (cost=0.29..1,990.72 rows=15,544 width=24) (actual time=0.023..8.264 rows=15,564 loops=1)

  • Buffers: shared hit=12314
22. 15.644 15.644 ↓ 1.1 26,175 1

Index Scan using ship_ship_main_fk_i on ship sh (cost=0.29..4,561.90 rows=24,427 width=124) (actual time=0.017..15.644 rows=26,175 loops=1)

  • Buffers: shared hit=14938
23. 12.744 82.402 ↓ 1.0 31,789 1

Materialize (cost=0.57..11,730.04 rows=31,390 width=24) (actual time=0.032..82.402 rows=31,789 loops=1)

  • Buffers: shared hit=12867
24. 33.856 69.658 ↓ 1.0 31,789 1

Merge Left Join (cost=0.57..11,651.57 rows=31,390 width=24) (actual time=0.028..69.658 rows=31,789 loops=1)

  • Merge Cond: (sr_1.id = sra.service_request_id)
  • Buffers: shared hit=12867
25. 21.372 21.372 ↓ 1.0 31,789 1

Index Scan using service_request_pk on service_request sr_1 (cost=0.29..4,418.35 rows=31,390 width=24) (actual time=0.014..21.372 rows=31,789 loops=1)

  • Buffers: shared hit=11692
26. 14.430 14.430 ↑ 1.0 31,595 1

Index Scan using srvreqansw_srvreq_fk_i on service_request_answer sra (cost=0.29..3,999.22 rows=32,598 width=16) (actual time=0.009..14.430 rows=31,595 loops=1)

  • Buffers: shared hit=1175
27. 0.002 0.039 ↑ 1.0 1 1

Hash (cost=3.15..3.15 rows=1 width=8) (actual time=0.039..0.039 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=2
28. 0.001 0.037 ↑ 1.0 1 1

Merge Join (cost=3.04..3.15 rows=1 width=8) (actual time=0.036..0.037 rows=1 loops=1)

  • Merge Cond: (at.id = att.srvreq_answer_type_id)
  • Buffers: shared hit=2
29. 0.008 0.026 ↑ 1.0 1 1

Sort (cost=1.42..1.42 rows=1 width=8) (actual time=0.025..0.026 rows=1 loops=1)

  • Sort Key: at.id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=1
30. 0.018 0.018 ↑ 1.0 1 1

Seq Scan on srvreq_answer_type at (cost=0.00..1.41 rows=1 width=8) (actual time=0.017..0.018 rows=1 loops=1)

  • Filter: ((code)::text = '1'::text)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=1
31. 0.004 0.010 ↑ 1.0 2 1

Sort (cost=1.62..1.62 rows=2 width=8) (actual time=0.010..0.010 rows=2 loops=1)

  • Sort Key: att.srvreq_answer_type_id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=1
32. 0.006 0.006 ↑ 1.0 2 1

Seq Scan on srvreq_answer_type_translation att (cost=0.00..1.61 rows=2 width=8) (actual time=0.005..0.006 rows=2 loops=1)

  • Filter: (languages_id = '1'::bigint)
  • Rows Removed by Filter: 2
  • Buffers: shared hit=1
33. 0.002 0.065 ↑ 1.0 5 1

Hash (cost=4.94..4.94 rows=5 width=16) (actual time=0.065..0.065 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=2
34. 0.011 0.063 ↑ 1.0 5 1

Merge Join (cost=4.38..4.94 rows=5 width=16) (actual time=0.053..0.063 rows=5 loops=1)

  • Merge Cond: (ss.id = sst.ship_status_id)
  • Buffers: shared hit=2
35. 0.014 0.030 ↑ 1.0 5 1

Sort (cost=1.87..1.89 rows=5 width=8) (actual time=0.029..0.030 rows=5 loops=1)

  • Sort Key: ss.id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=1
36. 0.016 0.016 ↑ 1.0 5 1

Seq Scan on ship_status ss (cost=0.00..1.81 rows=5 width=8) (actual time=0.015..0.016 rows=5 loops=1)

  • Filter: ((code)::text <> 'DELETED'::text)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=1
37. 0.014 0.022 ↑ 1.0 6 1

Sort (cost=2.51..2.52 rows=6 width=8) (actual time=0.021..0.022 rows=6 loops=1)

  • Sort Key: sst.ship_status_id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=1
38. 0.008 0.008 ↑ 1.0 6 1

Seq Scan on ship_status_translation sst (cost=0.00..2.43 rows=6 width=8) (actual time=0.007..0.008 rows=6 loops=1)

  • Filter: (languages_id = '1'::bigint)
  • Rows Removed by Filter: 6
  • Buffers: shared hit=1
39. 0.001 0.026 ↑ 1.0 4 1

Hash (cost=4.14..4.14 rows=4 width=8) (actual time=0.026..0.026 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=2
40. 0.004 0.025 ↑ 1.0 4 1

Merge Join (cost=3.70..4.14 rows=4 width=8) (actual time=0.022..0.025 rows=4 loops=1)

  • Merge Cond: (cr.id = crt.ship_change_reason_id)
  • Buffers: shared hit=2
41. 0.005 0.010 ↑ 1.0 4 1

Sort (cost=1.64..1.65 rows=4 width=8) (actual time=0.009..0.010 rows=4 loops=1)

  • Sort Key: cr.id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=1
42. 0.005 0.005 ↑ 1.0 4 1

Seq Scan on ship_change_reason cr (cost=0.00..1.60 rows=4 width=8) (actual time=0.004..0.005 rows=4 loops=1)

  • Buffers: shared hit=1
43. 0.004 0.011 ↑ 1.0 4 1

Sort (cost=2.06..2.07 rows=4 width=8) (actual time=0.011..0.011 rows=4 loops=1)

  • Sort Key: crt.ship_change_reason_id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=1
44. 0.007 0.007 ↑ 1.0 4 1

Seq Scan on ship_change_reason_translation crt (cost=0.00..2.02 rows=4 width=8) (actual time=0.005..0.007 rows=4 loops=1)

  • Filter: (languages_id = '1'::bigint)
  • Rows Removed by Filter: 4
  • Buffers: shared hit=1
45. 20.738 3,629.150 ↑ 1.0 1 20,738

Limit (cost=14.02..14.02 rows=1 width=8) (actual time=0.175..0.175 rows=1 loops=20,738)

  • Buffers: shared hit=2637757
46. 207.380 3,608.412 ↑ 1.0 1 20,738

Sort (cost=14.02..14.02 rows=1 width=8) (actual time=0.174..0.174 rows=1 loops=20,738)

  • Sort Key: ssra.srvreq_answer_date
  • Sort Method: top-N heapsort Memory: 25kB
  • Buffers: shared hit=2637757
47. 140.258 3,401.032 ↓ 17.0 17 20,738

Nested Loop (cost=0.99..14.01 rows=1 width=8) (actual time=0.013..0.164 rows=17 loops=20,738)

  • Buffers: shared hit=2637757
48. 168.002 2,571.512 ↓ 8.5 17 20,738

Nested Loop (cost=0.86..13.33 rows=2 width=16) (actual time=0.011..0.124 rows=17 loops=20,738)

  • Join Filter: (ssr.id = ssra.service_request_id)
  • Buffers: shared hit=1948495
49. 347.032 1,368.708 ↓ 8.5 17 20,738

Nested Loop (cost=0.57..12.27 rows=2 width=16) (actual time=0.008..0.066 rows=17 loops=20,738)

  • Buffers: shared hit=912584
50. 331.808 331.808 ↓ 8.5 17 20,738

Index Scan using servicereq_docum_fk_i on service_request ssr (cost=0.29..5.88 rows=2 width=8) (actual time=0.005..0.016 rows=17 loops=20,738)

  • Index Cond: (sr_1.document_id = document_id)
  • Buffers: shared hit=184872
51. 689.868 689.868 ↑ 1.0 1 344,934

Index Only Scan using ship_pk on ship ss_1 (cost=0.29..3.10 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=344,934)

  • Index Cond: (id = ssr.id)
  • Heap Fetches: 36474
  • Buffers: shared hit=727712
52. 1,034.802 1,034.802 ↑ 1.0 1 344,934

Index Scan using srvreqansw_srvreq_fk_i on service_request_answer ssra (cost=0.29..0.43 rows=1 width=24) (actual time=0.002..0.003 rows=1 loops=344,934)

  • Index Cond: (service_request_id = ss_1.id)
  • Buffers: shared hit=1035911
53. 689.262 689.262 ↑ 1.0 1 344,631

Index Scan using srvreq_ansver_type_pk on srvreq_answer_type sat (cost=0.13..0.24 rows=1 width=8) (actual time=0.001..0.002 rows=1 loops=344,631)

  • Index Cond: (id = ssra.srvreq_answer_type_id)
  • Filter: ((code)::text = '1'::text)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=689262
54. 0.980 2.657 ↑ 1.0 5,385 1

Hash (cost=664.46..664.46 rows=5,422 width=16) (actual time=2.657..2.657 rows=5,385 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 317kB
  • Buffers: shared hit=49
55. 1.677 1.677 ↑ 1.0 5,385 1

Seq Scan on supervisfilial_ship sf (cost=0.00..664.46 rows=5,422 width=16) (actual time=0.010..1.677 rows=5,385 loops=1)

  • Filter: ((statement_timestamp() >= start_date) AND (statement_timestamp() <= end_date))
  • Rows Removed by Filter: 131
  • Buffers: shared hit=49
56. 0.622 10.628 ↓ 1.0 2,019 1

Sort (cost=510.44..515.45 rows=2,003 width=8) (actual time=10.364..10.628 rows=2,019 loops=1)

  • Sort Key: gmssb.ship_id
  • Sort Method: quicksort Memory: 143kB
  • Buffers: shared hit=27
57. 10.006 10.006 ↓ 1.0 2,019 1

CTE Scan on gmssb (cost=0.00..400.60 rows=2,003 width=8) (actual time=2.310..10.006 rows=2,019 loops=1)

  • Buffers: shared hit=27
58. 0.015 0.303 ↑ 1.2 5 1

Hash (cost=48.69..48.69 rows=6 width=8) (actual time=0.303..0.303 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=151
59. 0.009 0.288 ↑ 1.2 5 1

Nested Loop Left Join (cost=0.29..48.69 rows=6 width=8) (actual time=0.031..0.288 rows=5 loops=1)

  • Buffers: shared hit=151
60. 0.009 0.009 ↑ 1.0 5 1

Seq Scan on supervising_filial fil (cost=0.00..1.70 rows=5 width=16) (actual time=0.008..0.009 rows=5 loops=1)

  • Buffers: shared hit=1
61. 0.270 0.270 ↑ 1.0 1 5

Index Scan using personver_person_fk_i on person_version sfpv (cost=0.29..9.30 rows=1 width=16) (actual time=0.007..0.054 rows=1 loops=5)

  • Index Cond: (person_id = fil.person_id)
  • Filter: ((statement_timestamp() >= start_date) AND (statement_timestamp() <= end_date))
  • Rows Removed by Filter: 38
  • Buffers: shared hit=150
62. 0.014 21.975 ↑ 10.0 1 1

Hash (cost=1,673.78..1,673.78 rows=10 width=2,390) (actual time=21.975..21.975 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
  • Buffers: shared hit=110
63. 0.022 21.961 ↑ 10.0 1 1

Nested Loop Left Join (cost=1,227.67..1,672.78 rows=10 width=2,390) (actual time=21.890..21.961 rows=1 loops=1)

  • Join Filter: (gmssb_1.ship_id = sh_1.id)
  • Buffers: shared hit=110
64.          

CTE gmssb

65. 13.584 19.629 ↓ 1.0 2,019 1

GroupAggregate (cost=950.14..1,186.64 rows=2,003 width=524) (actual time=4.993..19.629 rows=2,019 loops=1)

  • Group Key: grs.ship_id
  • Buffers: shared hit=27
66. 2.787 6.045 ↓ 1.0 3,522 1

Sort (cost=950.14..958.87 rows=3,491 width=19) (actual time=4.953..6.045 rows=3,522 loops=1)

  • Sort Key: grs.ship_id
  • Sort Method: quicksort Memory: 262kB
  • Buffers: shared hit=27
67. 2.319 3.258 ↓ 1.0 3,522 1

Hash Join (cost=2.21..744.70 rows=3,491 width=19) (actual time=0.042..3.258 rows=3,522 loops=1)

  • Hash Cond: (grs.gmssb_region_id = gr.id)
  • Buffers: shared hit=27
68. 0.924 0.924 ↓ 1.0 3,522 1

Seq Scan on gmssb_region_ship grs (cost=0.00..380.30 rows=3,491 width=16) (actual time=0.015..0.924 rows=3,522 loops=1)

  • Buffers: shared hit=26
69. 0.005 0.015 ↑ 1.0 5 1

Hash (cost=1.70..1.70 rows=5 width=19) (actual time=0.015..0.015 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
70. 0.010 0.010 ↑ 1.0 5 1

Seq Scan on gmssb_region gr (cost=0.00..1.70 rows=5 width=19) (actual time=0.006..0.010 rows=5 loops=1)

  • Buffers: shared hit=1
71. 0.005 0.670 ↑ 1.0 1 1

Nested Loop Left Join (cost=41.04..79.29 rows=1 width=1,841) (actual time=0.599..0.670 rows=1 loops=1)

  • Buffers: shared hit=83
72. 0.005 0.654 ↑ 1.0 1 1

Nested Loop Left Join (cost=40.75..78.71 rows=1 width=1,743) (actual time=0.587..0.654 rows=1 loops=1)

  • Buffers: shared hit=80
73. 0.005 0.617 ↑ 1.0 1 1

Nested Loop Left Join (cost=40.46..69.31 rows=1 width=1,735) (actual time=0.570..0.617 rows=1 loops=1)

  • Buffers: shared hit=75
74. 0.005 0.602 ↑ 1.0 1 1

Nested Loop Left Join (cost=40.33..68.97 rows=1 width=1,735) (actual time=0.558..0.602 rows=1 loops=1)

  • Buffers: shared hit=73
75. 0.007 0.547 ↑ 1.0 1 1

Nested Loop Left Join (cost=40.18..68.59 rows=1 width=1,735) (actual time=0.505..0.547 rows=1 loops=1)

  • Buffers: shared hit=70
76. 0.003 0.450 ↑ 1.0 1 1

Nested Loop (cost=26.16..54.37 rows=1 width=1,735) (actual time=0.410..0.450 rows=1 loops=1)

  • Join Filter: (ss_2.id = sst_1.ship_status_id)
  • Buffers: shared hit=49
77. 0.004 0.438 ↑ 1.0 1 1

Nested Loop (cost=26.03..54.02 rows=1 width=1,722) (actual time=0.400..0.438 rows=1 loops=1)

  • Buffers: shared hit=47
78. 0.004 0.422 ↑ 1.0 1 1

Nested Loop Left Join (cost=25.90..53.68 rows=1 width=1,705) (actual time=0.387..0.422 rows=1 loops=1)

  • Buffers: shared hit=45
79. 0.005 0.405 ↑ 1.0 1 1

Nested Loop Left Join (cost=25.61..49.58 rows=1 width=1,615) (actual time=0.371..0.405 rows=1 loops=1)

  • Join Filter: (cr_1.id = sh_1.ship_change_reason_id)
  • Rows Removed by Join Filter: 4
  • Buffers: shared hit=42
80. 0.004 0.349 ↑ 1.0 1 1

Nested Loop Left Join (cost=21.91..45.03 rows=1 width=1,587) (actual time=0.316..0.349 rows=1 loops=1)

  • Buffers: shared hit=40
81. 0.005 0.345 ↑ 1.0 1 1

Nested Loop Left Join (cost=21.78..43.34 rows=1 width=1,554) (actual time=0.312..0.345 rows=1 loops=1)

  • Join Filter: (sh_1.ship_registration_type_id = srt.id)
  • Rows Removed by Join Filter: 4
  • Buffers: shared hit=40
82. 0.005 0.334 ↑ 1.0 1 1

Nested Loop Left Join (cost=21.78..41.33 rows=1 width=1,534) (actual time=0.302..0.334 rows=1 loops=1)

  • Buffers: shared hit=39
83. 0.005 0.319 ↑ 1.0 1 1

Nested Loop Left Join (cost=21.64..40.21 rows=1 width=1,508) (actual time=0.289..0.319 rows=1 loops=1)

  • Join Filter: (sr_2.id = sh_1.id)
  • Buffers: shared hit=37
84. 0.004 0.226 ↑ 1.0 1 1

Nested Loop Left Join (cost=18.03..28.76 rows=1 width=1,484) (actual time=0.204..0.226 rows=1 loops=1)

  • Buffers: shared hit=29
85. 0.004 0.211 ↑ 1.0 1 1

Nested Loop Left Join (cost=17.76..24.68 rows=1 width=1,442) (actual time=0.191..0.211 rows=1 loops=1)

  • Buffers: shared hit=26
86. 0.004 0.198 ↑ 1.0 1 1

Nested Loop Left Join (cost=17.49..24.12 rows=1 width=1,383) (actual time=0.180..0.198 rows=1 loops=1)

  • Buffers: shared hit=23
87. 0.005 0.190 ↑ 1.0 1 1

Nested Loop Left Join (cost=17.34..21.96 rows=1 width=1,375) (actual time=0.174..0.190 rows=1 loops=1)

  • Buffers: shared hit=21
88. 0.003 0.185 ↑ 1.0 1 1

Nested Loop Left Join (cost=17.07..21.40 rows=1 width=1,341) (actual time=0.170..0.185 rows=1 loops=1)

  • Buffers: shared hit=21
89. 0.006 0.181 ↑ 1.0 1 1

Nested Loop Left Join (cost=16.92..19.24 rows=1 width=1,333) (actual time=0.166..0.181 rows=1 loops=1)

  • Buffers: shared hit=21
90. 0.028 0.165 ↑ 1.0 1 1

Hash Right Join (cost=16.65..18.68 rows=1 width=1,274) (actual time=0.152..0.165 rows=1 loops=1)

  • Hash Cond: (ssp.id = sh_1.ship_purpose_id)
  • Buffers: shared hit=18
91. 0.015 0.015 ↑ 1.0 7 1

Seq Scan on ship_purpose ssp (cost=0.00..1.90 rows=7 width=19) (actual time=0.011..0.015 rows=7 loops=1)

  • Buffers: shared hit=1
92. 0.009 0.122 ↑ 1.0 1 1

Hash (cost=16.55..16.55 rows=1 width=1,255) (actual time=0.122..0.122 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=17
93. 0.007 0.113 ↑ 1.0 1 1

Nested Loop Left Join (cost=2.12..16.55 rows=1 width=1,255) (actual time=0.106..0.113 rows=1 loops=1)

  • Buffers: shared hit=17
94. 0.001 0.097 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.98..14.40 rows=1 width=1,247) (actual time=0.092..0.097 rows=1 loops=1)

  • Buffers: shared hit=15
95. 0.005 0.091 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.70..13.82 rows=1 width=1,234) (actual time=0.087..0.091 rows=1 loops=1)

  • Buffers: shared hit=12
96. 0.002 0.086 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.42..13.24 rows=1 width=1,221) (actual time=0.083..0.086 rows=1 loops=1)

  • Buffers: shared hit=12
97. 0.002 0.083 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.14..10.95 rows=1 width=1,213) (actual time=0.080..0.083 rows=1 loops=1)

  • Buffers: shared hit=12
98. 0.005 0.068 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.85..10.38 rows=1 width=1,192) (actual time=0.066..0.068 rows=1 loops=1)

  • Buffers: shared hit=9
99. 0.009 0.049 ↑ 1.0 1 1

Nested Loop (cost=0.57..8.09 rows=1 width=1,184) (actual time=0.048..0.049 rows=1 loops=1)

  • Buffers: shared hit=6
100. 0.028 0.028 ↑ 1.0 1 1

Index Scan using ship_pk on ship sh_1 (cost=0.29..4.00 rows=1 width=1,160) (actual time=0.027..0.028 rows=1 loops=1)

  • Index Cond: (id = 173709)
  • Buffers: shared hit=3
101. 0.012 0.012 ↑ 1.0 1 1

Index Scan using pk_ship_main on ship_main shm_1 (cost=0.29..3.99 rows=1 width=24) (actual time=0.012..0.012 rows=1 loops=1)

  • Index Cond: (id = sh_1.ship_main_id)
  • Buffers: shared hit=3
102. 0.014 0.014 ↑ 1.0 1 1

Index Only Scan using subscription_port_pk on subscription_port sp (cost=0.28..2.19 rows=1 width=8) (actual time=0.013..0.014 rows=1 loops=1)

  • Index Cond: (id = sh_1.subscription_port_id)
  • Heap Fetches: 0
  • Buffers: shared hit=3
103. 0.013 0.013 ↑ 1.0 1 1

Index Scan using subscrporttr_subscrport_lang_uq_i on subscription_port_translation spt (cost=0.28..0.48 rows=1 width=29) (actual time=0.012..0.013 rows=1 loops=1)

  • Index Cond: ((subscription_port_id = sp.id) AND (languages_id = '1'::bigint))
  • Buffers: shared hit=3
104. 0.001 0.001 ↓ 0.0 0 1

Index Only Scan using subscription_port_pk on subscription_port rsp (cost=0.28..2.19 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=1)

  • Index Cond: (id = sh_1.root_port_id)
  • Heap Fetches: 0
105. 0.000 0.000 ↓ 0.0 0 1

Index Scan using subscrporttr_subscrport_lang_uq_i on subscription_port_translation rspt (cost=0.28..0.48 rows=1 width=29) (actual time=0.000..0.000 rows=0 loops=1)

  • Index Cond: ((subscription_port_id = rsp.id) AND (languages_id = '1'::bigint))
106. 0.005 0.005 ↑ 1.0 1 1

Index Scan using subscrporttr_subscrport_lang_uq_i on subscription_port_translation spt_en (cost=0.28..0.48 rows=1 width=29) (actual time=0.004..0.005 rows=1 loops=1)

  • Index Cond: ((subscription_port_id = sp.id) AND (languages_id = '2'::bigint))
  • Buffers: shared hit=3
107. 0.009 0.009 ↑ 1.0 1 1

Index Only Scan using person_resident_type_pk on person_resident_type prt (cost=0.14..2.05 rows=1 width=8) (actual time=0.009..0.009 rows=1 loops=1)

  • Index Cond: (id = sh_1.resident_type_id)
  • Heap Fetches: 0
  • Buffers: shared hit=2
108. 0.010 0.010 ↑ 1.0 1 1

Index Scan using prsrestptr_prsrestp_lang_uq_i on person_resident_type_translation prtt (cost=0.27..0.47 rows=1 width=75) (actual time=0.009..0.010 rows=1 loops=1)

  • Index Cond: ((person_resident_type_id = prt.id) AND (language_id = '1'::bigint))
  • Buffers: shared hit=3
109. 0.001 0.001 ↓ 0.0 0 1

Index Only Scan using person_resident_type_pk on person_resident_type rprt (cost=0.14..2.05 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=1)

  • Index Cond: (id = sh_1.root_resident_type_id)
  • Heap Fetches: 0
110. 0.000 0.000 ↓ 0.0 0 1

Index Scan using prsrestptr_prsrestp_lang_uq_i on person_resident_type_translation rprtt (cost=0.27..0.47 rows=1 width=50) (actual time=0.000..0.000 rows=0 loops=1)

  • Index Cond: ((person_resident_type_id = rprt.id) AND (language_id = '1'::bigint))
111. 0.004 0.004 ↑ 1.0 1 1

Index Only Scan using person_resident_type_pk on person_resident_type brt (cost=0.14..2.05 rows=1 width=8) (actual time=0.003..0.004 rows=1 loops=1)

  • Index Cond: (id = sh_1.build_resident_type_id)
  • Heap Fetches: 0
  • Buffers: shared hit=2
112. 0.009 0.009 ↑ 1.0 1 1

Index Scan using prsrestptr_prsrestp_lang_uq_i on person_resident_type_translation brtt (cost=0.27..0.47 rows=1 width=75) (actual time=0.008..0.009 rows=1 loops=1)

  • Index Cond: ((person_resident_type_id = brt.id) AND (language_id = '1'::bigint))
  • Buffers: shared hit=3
113. 0.011 0.011 ↑ 1.0 1 1

Index Scan using ship_type_pk on ship_type sht (cost=0.27..3.98 rows=1 width=50) (actual time=0.010..0.011 rows=1 loops=1)

  • Index Cond: (sh_1.ship_type_id = id)
  • Buffers: shared hit=3
114. 0.002 0.088 ↑ 1.0 1 1

Nested Loop Left Join (cost=3.61..11.35 rows=1 width=32) (actual time=0.081..0.088 rows=1 loops=1)

  • Join Filter: (sra_1.service_request_id = sr_2.id)
  • Buffers: shared hit=8
115. 0.014 0.014 ↑ 1.0 1 1

Index Scan using service_request_pk on service_request sr_2 (cost=0.29..4.00 rows=1 width=24) (actual time=0.013..0.014 rows=1 loops=1)

  • Index Cond: (id = 173709)
  • Buffers: shared hit=3
116. 0.004 0.072 ↑ 1.0 1 1

Nested Loop Left Join (cost=3.32..7.25 rows=1 width=16) (actual time=0.066..0.072 rows=1 loops=1)

  • Join Filter: (at_1.id = sra_1.srvreq_answer_type_id)
  • Buffers: shared hit=5
117. 0.014 0.014 ↑ 1.0 1 1

Index Scan using srvreqansw_srvreq_fk_i on service_request_answer sra_1 (cost=0.29..4.00 rows=1 width=24) (actual time=0.013..0.014 rows=1 loops=1)

  • Index Cond: (service_request_id = 173709)
  • Buffers: shared hit=3
118. 0.006 0.054 ↑ 1.0 1 1

Merge Join (cost=3.04..3.15 rows=1 width=8) (actual time=0.050..0.054 rows=1 loops=1)

  • Merge Cond: (at_1.id = att_1.srvreq_answer_type_id)
  • Buffers: shared hit=2
119. 0.015 0.030 ↑ 1.0 1 1

Sort (cost=1.42..1.42 rows=1 width=8) (actual time=0.029..0.030 rows=1 loops=1)

  • Sort Key: at_1.id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=1
120. 0.015 0.015 ↑ 1.0 1 1

Seq Scan on srvreq_answer_type at_1 (cost=0.00..1.41 rows=1 width=8) (actual time=0.013..0.015 rows=1 loops=1)

  • Filter: ((code)::text = '1'::text)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=1
121. 0.010 0.018 ↑ 1.0 2 1

Sort (cost=1.62..1.62 rows=2 width=8) (actual time=0.017..0.018 rows=2 loops=1)

  • Sort Key: att_1.srvreq_answer_type_id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=1
122. 0.008 0.008 ↑ 1.0 2 1

Seq Scan on srvreq_answer_type_translation att_1 (cost=0.00..1.61 rows=2 width=8) (actual time=0.007..0.008 rows=2 loops=1)

  • Filter: (languages_id = '1'::bigint)
  • Rows Removed by Filter: 2
  • Buffers: shared hit=1
123. 0.010 0.010 ↑ 1.0 1 1

Index Scan using shippurptr_shippurp_lang_uq_i on ship_purpose_translation sspt (cost=0.14..1.02 rows=1 width=42) (actual time=0.009..0.010 rows=1 loops=1)

  • Index Cond: ((ship_purpose_id = ssp.id) AND (languages_id = '1'::bigint))
  • Buffers: shared hit=2
124. 0.006 0.006 ↑ 1.0 4 1

Seq Scan on ship_registration_type srt (cost=0.00..1.60 rows=4 width=20) (actual time=0.005..0.006 rows=4 loops=1)

  • Buffers: shared hit=1
125. 0.000 0.000 ↓ 0.0 0 1

Index Scan using shipregtypetr_shipregtype_lang_uq_i on ship_reg_type_translation srtt (cost=0.13..1.59 rows=1 width=49) (actual time=0.000..0.000 rows=0 loops=1)

  • Index Cond: ((ship_registration_type_id = srt.id) AND (languages_id = '1'::bigint))
126. 0.006 0.051 ↑ 1.0 4 1

Merge Join (cost=3.70..4.14 rows=4 width=36) (actual time=0.044..0.051 rows=4 loops=1)

  • Merge Cond: (cr_1.id = crt_1.ship_change_reason_id)
  • Buffers: shared hit=2
127. 0.016 0.023 ↑ 1.0 4 1

Sort (cost=1.64..1.65 rows=4 width=14) (actual time=0.021..0.023 rows=4 loops=1)

  • Sort Key: cr_1.id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=1
128. 0.007 0.007 ↑ 1.0 4 1

Seq Scan on ship_change_reason cr_1 (cost=0.00..1.60 rows=4 width=14) (actual time=0.006..0.007 rows=4 loops=1)

  • Buffers: shared hit=1
129. 0.014 0.022 ↑ 1.0 4 1

Sort (cost=2.06..2.07 rows=4 width=30) (actual time=0.020..0.022 rows=4 loops=1)

  • Sort Key: crt_1.ship_change_reason_id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=1
130. 0.008 0.008 ↑ 1.0 4 1

Seq Scan on ship_change_reason_translation crt_1 (cost=0.00..2.02 rows=4 width=30) (actual time=0.006..0.008 rows=4 loops=1)

  • Filter: (languages_id = '1'::bigint)
  • Rows Removed by Filter: 4
  • Buffers: shared hit=1
131. 0.013 0.013 ↑ 1.0 1 1

Index Scan using legal_person_pk on legal_person csms (cost=0.29..4.00 rows=1 width=106) (actual time=0.012..0.013 rows=1 loops=1)

  • Index Cond: (id = sr_2.csms_branch_id)
  • Buffers: shared hit=3
132. 0.012 0.012 ↑ 1.0 1 1

Index Scan using ship_status_pk on ship_status ss_2 (cost=0.13..0.24 rows=1 width=17) (actual time=0.011..0.012 rows=1 loops=1)

  • Index Cond: (id = shm_1.ship_status_id)
  • Filter: ((code)::text <> 'DELETED'::text)
  • Buffers: shared hit=2
133. 0.009 0.009 ↑ 1.0 1 1

Index Scan using shipstatustr_shipstlang_uq_i on ship_status_translation sst_1 (cost=0.14..0.25 rows=1 width=29) (actual time=0.007..0.009 rows=1 loops=1)

  • Index Cond: ((ship_status_id = shm_1.ship_status_id) AND (languages_id = '1'::bigint))
  • Buffers: shared hit=2
134. 0.001 0.090 ↑ 1.0 1 1

Limit (cost=14.02..14.02 rows=1 width=8) (actual time=0.090..0.090 rows=1 loops=1)

  • Buffers: shared hit=21
135. 0.014 0.089 ↑ 1.0 1 1

Sort (cost=14.02..14.02 rows=1 width=8) (actual time=0.089..0.089 rows=1 loops=1)

  • Sort Key: ssra_1.srvreq_answer_date
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=21
136. 0.003 0.075 ↓ 2.0 2 1

Nested Loop (cost=0.99..14.01 rows=1 width=8) (actual time=0.050..0.075 rows=2 loops=1)

  • Buffers: shared hit=21
137. 0.004 0.060 ↑ 1.0 2 1

Nested Loop (cost=0.86..13.33 rows=2 width=16) (actual time=0.040..0.060 rows=2 loops=1)

  • Join Filter: (ssr_1.id = ssra_1.service_request_id)
  • Buffers: shared hit=17
138. 0.007 0.040 ↑ 1.0 2 1

Nested Loop (cost=0.57..12.27 rows=2 width=16) (actual time=0.028..0.040 rows=2 loops=1)

  • Buffers: shared hit=11
139. 0.015 0.015 ↑ 1.0 2 1

Index Scan using servicereq_docum_fk_i on service_request ssr_1 (cost=0.29..5.88 rows=2 width=8) (actual time=0.012..0.015 rows=2 loops=1)

  • Index Cond: (sr_2.document_id = document_id)
  • Buffers: shared hit=4
140. 0.018 0.018 ↑ 1.0 1 2

Index Only Scan using ship_pk on ship ss_3 (cost=0.29..3.10 rows=1 width=8) (actual time=0.008..0.009 rows=1 loops=2)

  • Index Cond: (id = ssr_1.id)
  • Heap Fetches: 2
  • Buffers: shared hit=7
141. 0.016 0.016 ↑ 1.0 1 2

Index Scan using srvreqansw_srvreq_fk_i on service_request_answer ssra_1 (cost=0.29..0.43 rows=1 width=24) (actual time=0.007..0.008 rows=1 loops=2)

  • Index Cond: (service_request_id = ss_3.id)
  • Buffers: shared hit=6
142. 0.012 0.012 ↑ 1.0 1 2

Index Scan using srvreq_ansver_type_pk on srvreq_answer_type sat_1 (cost=0.13..0.24 rows=1 width=8) (actual time=0.005..0.006 rows=1 loops=2)

  • Index Cond: (id = ssra_1.srvreq_answer_type_id)
  • Filter: ((code)::text = '1'::text)
  • Buffers: shared hit=4
143. 0.050 0.050 ↑ 1.0 1 1

Index Scan using supervisfil_shpmn_date_uq on supervisfilial_ship sf_1 (cost=0.15..0.28 rows=1 width=16) (actual time=0.049..0.050 rows=1 loops=1)

  • Index Cond: (ship_main_id = shm_1.id)
  • Filter: ((statement_timestamp() >= start_date) AND (statement_timestamp() <= end_date))
  • Buffers: shared hit=3
144. 0.010 0.010 ↑ 1.0 1 1

Index Scan using pk_supervising_filial on supervising_filial fil_1 (cost=0.13..0.24 rows=1 width=16) (actual time=0.008..0.010 rows=1 loops=1)

  • Index Cond: (id = sf_1.filial_id)
  • Buffers: shared hit=2
145. 0.032 0.032 ↑ 1.0 1 1

Index Scan using personver_person_fk_i on person_version sfpv_1 (cost=0.29..9.30 rows=1 width=16) (actual time=0.013..0.032 rows=1 loops=1)

  • Index Cond: (person_id = fil_1.person_id)
  • Filter: ((statement_timestamp() >= start_date) AND (statement_timestamp() <= end_date))
  • Rows Removed by Filter: 4
  • Buffers: shared hit=5
146. 0.011 0.011 ↑ 1.0 1 1

Index Scan using legal_person_pk on legal_person sflp (cost=0.29..0.48 rows=1 width=106) (actual time=0.008..0.011 rows=1 loops=1)

  • Index Cond: (id = sfpv_1.id)
  • Buffers: shared hit=3
147. 21.269 21.269 ↓ 0.0 0 1

CTE Scan on gmssb gmssb_1 (cost=0.00..405.61 rows=10 width=524) (actual time=21.269..21.269 rows=0 loops=1)

  • Filter: (ship_id = 173709)
  • Rows Removed by Filter: 2019
  • Buffers: shared hit=27
148. 0.006 6,106.965 ↑ 10.0 1 1

Materialize (cost=210,290.57..229,315.17 rows=10 width=5,548) (actual time=5,189.096..6,106.965 rows=1 loops=1)

  • Buffers: shared hit=170400, temp read=18995 written=31360
149. 15.699 6,106.959 ↑ 10.0 1 1

Hash Right Join (cost=210,290.57..229,315.12 rows=10 width=5,548) (actual time=5,189.090..6,106.959 rows=1 loops=1)

  • Hash Cond: (repr_pers.person_version_id = sr.applicant_id)
  • Buffers: shared hit=170400, temp read=18995 written=31360
150. 6,090.946 6,090.946 ↓ 1.0 62,911 1

CTE Scan on repr_pers (cost=210,242.53..222,768.33 rows=62,629 width=4,133) (actual time=5,085.858..6,090.946 rows=62,911 loops=1)

  • Buffers: shared hit=170343, temp read=18995 written=31360
151.          

CTE tu_csms

152. 141.565 4,210.678 ↓ 1,212.2 310,329 1

Unique (cost=100,072.40..100,091.64 rows=256 width=618) (actual time=3,954.297..4,210.678 rows=310,329 loops=1)

  • Buffers: shared hit=84250, temp read=9698 written=22064
153. 1,839.478 4,069.113 ↓ 126.6 324,651 1

Sort (cost=100,072.40..100,078.81 rows=2,565 width=618) (actual time=3,954.294..4,069.113 rows=324,651 loops=1)

  • Sort Key: person_division_ocm_v.user_person_version_id, person_division_ocm_v.person_category_code
  • Sort Method: external merge Disk: 77568kB
  • Buffers: shared hit=84250, temp read=9698 written=22064
154. 110.335 2,229.635 ↓ 126.6 324,651 1

Subquery Scan on person_division_ocm_v (cost=99,157.66..99,927.16 rows=2,565 width=618) (actual time=78.236..2,229.635 rows=324,651 loops=1)

  • Buffers: shared hit=84250, temp written=12366
155. 2,119.300 2,119.300 ↓ 126.6 324,651 1

CTE Scan on terr_division td_3 (cost=99,157.66..99,670.66 rows=2,565 width=1,166) (actual time=78.235..2,119.300 rows=324,651 loops=1)

  • Buffers: shared hit=84250, temp written=12366
156.          

CTE usrp

157. 110.023 510.758 ↓ 1.0 62,909 1

Hash Join (cost=18,792.62..56,009.06 rows=62,629 width=40) (actual time=56.950..510.758 rows=62,909 loops=1)

  • Hash Cond: (pv_2.person_id = p_2.id)
  • Buffers: shared hit=39679
158. 80.175 386.399 ↓ 1.0 62,909 1

Merge Left Join (cost=11,937.30..42,029.70 rows=62,629 width=57) (actual time=42.477..386.399 rows=62,909 loops=1)

  • Merge Cond: (pv_2.id = i_2.id)
  • Buffers: shared hit=39496
159. 23.400 270.251 ↓ 1.0 62,909 1

Merge Left Join (cost=11,937.01..34,131.46 rows=62,629 width=46) (actual time=42.464..270.251 rows=62,909 loops=1)

  • Merge Cond: (pv_2.id = se_2.id)
  • Buffers: shared hit=37576
160. 44.907 243.295 ↓ 1.0 62,909 1

Merge Left Join (cost=11,936.73..32,261.97 rows=62,629 width=36) (actual time=42.450..243.295 rows=62,909 loops=1)

  • Merge Cond: (pv_2.id = lp_2.id)
  • Buffers: shared hit=36439
161. 37.740 169.277 ↓ 1.0 62,909 1

Merge Left Join (cost=11,936.14..24,751.23 rows=62,629 width=26) (actual time=42.433..169.277 rows=62,909 loops=1)

  • Merge Cond: (pv_2.id = ofc.id)
  • Buffers: shared hit=31675
162. 74.139 74.139 ↓ 1.0 62,909 1

Index Scan using person_version_pk on person_version pv_2 (cost=0.29..9,848.48 rows=62,629 width=16) (actual time=0.014..74.139 rows=62,909 loops=1)

  • Buffers: shared hit=24569
163. 24.370 57.398 ↑ 1.0 25,987 1

Sort (cost=11,935.85..12,002.77 rows=26,765 width=18) (actual time=42.415..57.398 rows=25,987 loops=1)

  • Sort Key: ofc.id
  • Sort Method: quicksort Memory: 2775kB
  • Buffers: shared hit=7106
164. 13.666 33.028 ↑ 1.0 25,987 1

Merge Left Join (cost=0.57..9,967.55 rows=26,765 width=18) (actual time=0.027..33.028 rows=25,987 loops=1)

  • Merge Cond: (ofc.legal_person_id = ofclp.id)
  • Buffers: shared hit=7106
165. 6.365 6.365 ↑ 1.0 25,987 1

Index Scan using official_legal_fk_i on official_person ofc (cost=0.29..3,347.33 rows=26,765 width=16) (actual time=0.012..6.365 rows=25,987 loops=1)

  • Buffers: shared hit=2268
166. 12.997 12.997 ↓ 1.6 47,246 1

Index Scan using legal_person_pk on legal_person ofclp (cost=0.29..4,335.41 rows=29,832 width=18) (actual time=0.012..12.997 rows=47,246 loops=1)

  • Buffers: shared hit=4838
167. 29.111 29.111 ↓ 1.0 29,885 1

Index Scan using legal_person_pk on legal_person lp_2 (cost=0.29..4,335.41 rows=29,832 width=18) (actual time=0.014..29.111 rows=29,885 loops=1)

  • Buffers: shared hit=4764
168. 3.556 3.556 ↓ 1.0 6,978 1

Index Scan using selfemployed_person_pk on selfemployed_person se_2 (cost=0.28..1,001.06 rows=6,945 width=18) (actual time=0.012..3.556 rows=6,978 loops=1)

  • Buffers: shared hit=1137
169. 35.973 35.973 ↑ 1.0 33,020 1

Index Scan using individual_pk on individual i_2 (cost=0.29..4,430.74 rows=33,460 width=19) (actual time=0.010..35.973 rows=33,020 loops=1)

  • Buffers: shared hit=1920
170. 4.829 14.336 ↓ 1.0 22,125 1

Hash (cost=4,634.65..4,634.65 rows=21,665 width=10) (actual time=14.336..14.336 rows=22,125 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1164kB
  • Buffers: shared hit=183
171. 7.135 9.507 ↓ 1.0 22,125 1

Hash Join (cost=2.01..4,634.65 rows=21,665 width=10) (actual time=0.039..9.507 rows=22,125 loops=1)

  • Hash Cond: (p_2.type_id = pt_2.id)
  • Buffers: shared hit=183
172. 2.362 2.362 ↓ 1.0 22,125 1

Seq Scan on person p_2 (cost=0.00..2,384.90 rows=21,665 width=16) (actual time=0.015..2.362 rows=22,125 loops=1)

  • Buffers: shared hit=182
173. 0.004 0.010 ↑ 1.0 4 1

Hash (cost=1.60..1.60 rows=4 width=10) (actual time=0.010..0.010 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
174. 0.006 0.006 ↑ 1.0 4 1

Seq Scan on person_type pt_2 (cost=0.00..1.60 rows=4 width=10) (actual time=0.004..0.006 rows=4 loops=1)

  • Buffers: shared hit=1
175.          

CTE terr_division

176. 65.157 1,224.146 ↓ 126.6 324,651 1

Append (cost=1,372.92..43,148.60 rows=2,565 width=178) (actual time=78.232..1,224.146 rows=324,651 loops=1)

  • Buffers: shared hit=84250
177. 261.989 849.736 ↓ 347.9 297,436 1

Hash Join (cost=1,372.92..14,297.37 rows=855 width=178) (actual time=78.230..849.736 rows=297,436 loops=1)

  • Hash Cond: ("substring"((usrp.oktmo)::text, 1, 2) = (tdoktmo.oktmo)::text)
  • Buffers: shared hit=54536
178. 566.528 566.528 ↓ 1.0 62,909 1

CTE Scan on usrp (cost=0.00..12,525.80 rows=62,629 width=40) (actual time=56.953..566.528 rows=62,909 loops=1)

  • Buffers: shared hit=39679
179. 4.312 21.219 ↓ 384.8 5,772 1

Hash (cost=1,371.38..1,371.38 rows=15 width=175) (actual time=21.219..21.219 rows=5,772 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 2293kB
  • Buffers: shared hit=14857
180. 4.617 16.907 ↓ 384.8 5,772 1

Nested Loop (cost=851.07..1,371.38 rows=15 width=175) (actual time=3.946..16.907 rows=5,772 loops=1)

  • Buffers: shared hit=14857
181. 1.593 6.518 ↓ 384.8 5,772 1

Hash Join (cost=850.93..1,366.03 rows=15 width=173) (actual time=3.938..6.518 rows=5,772 loops=1)

  • Hash Cond: (tdl.person_id = pcl.person_id)
  • Buffers: shared hit=3313
182. 0.829 4.773 ↓ 2.5 2,201 1

Hash Join (cost=771.00..975.22 rows=886 width=189) (actual time=3.778..4.773 rows=2,201 loops=1)

  • Hash Cond: (tdoktmo.territorial_division_id = tdt.territorial_division_id)
  • Buffers: shared hit=3309
183. 0.190 0.190 ↑ 1.0 1,099 1

Seq Scan on territorial_division_oktmo tdoktmo (cost=0.00..118.30 rows=1,099 width=13) (actual time=0.005..0.190 rows=1,099 loops=1)

  • Buffers: shared hit=7
184. 0.065 3.754 ↓ 2.5 175 1

Hash (cost=763.83..763.83 rows=70 width=200) (actual time=3.754..3.754 rows=175 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 59kB
  • Buffers: shared hit=3302
185. 0.089 3.689 ↓ 2.5 175 1

Merge Join (cost=717.07..763.83 rows=70 width=200) (actual time=3.458..3.689 rows=175 loops=1)

  • Merge Cond: (td.id = tdt.territorial_division_id)
  • Buffers: shared hit=3302
186. 0.059 3.545 ↓ 2.5 175 1

Merge Join (cost=716.93..736.82 rows=70 width=162) (actual time=3.443..3.545 rows=175 loops=1)

  • Merge Cond: (td.id = tdl.territorial_division_id)
  • Buffers: shared hit=3299
187. 0.024 0.024 ↑ 1.0 94 1

Index Only Scan using territorial_division_pk on territorial_division td (cost=0.14..13.61 rows=94 width=8) (actual time=0.011..0.024 rows=94 loops=1)

  • Heap Fetches: 0
  • Buffers: shared hit=2
188. 0.153 3.462 ↓ 2.5 175 1

Sort (cost=715.62..715.79 rows=70 width=154) (actual time=3.428..3.462 rows=175 loops=1)

  • Sort Key: tdl.territorial_division_id
  • Sort Method: quicksort Memory: 90kB
  • Buffers: shared hit=3297
189. 0.082 3.309 ↓ 2.5 175 1

Hash Join (cost=2.88..713.47 rows=70 width=154) (actual time=0.058..3.309 rows=175 loops=1)

  • Hash Cond: (p_3.type_id = tpt.id)
  • Buffers: shared hit=3297
190. 0.059 3.219 ↓ 2.5 175 1

Nested Loop (cost=0.86..704.20 rows=70 width=154) (actual time=0.044..3.219 rows=175 loops=1)

  • Buffers: shared hit=3296
191. 0.053 2.810 ↓ 1.2 175 1

Nested Loop (cost=0.58..617.86 rows=148 width=56) (actual time=0.037..2.810 rows=175 loops=1)

  • Join Filter: (tdl.person_id = pv_3.person_id)
  • Buffers: shared hit=2771
192. 0.097 0.482 ↑ 1.0 175 1

Nested Loop (cost=0.29..434.13 rows=175 width=40) (actual time=0.021..0.482 rows=175 loops=1)

  • Buffers: shared hit=527
193. 0.035 0.035 ↑ 1.0 175 1

Seq Scan on person_terrdivision_link tdl (cost=0.00..19.90 rows=175 width=16) (actual time=0.005..0.035 rows=175 loops=1)

  • Buffers: shared hit=2
194. 0.350 0.350 ↑ 1.0 1 175

Index Scan using person_pk on person p_3 (cost=0.29..2.27 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=175)

  • Index Cond: (id = tdl.person_id)
  • Buffers: shared hit=525
195. 2.275 2.275 ↑ 1.0 1 175

Index Scan using personver_person_fk_i on person_version pv_3 (cost=0.29..0.95 rows=1 width=16) (actual time=0.002..0.013 rows=1 loops=175)

  • Index Cond: (person_id = p_3.id)
  • Filter: ((statement_timestamp() >= start_date) AND (statement_timestamp() <= end_date))
  • Rows Removed by Filter: 13
  • Buffers: shared hit=2244
196. 0.350 0.350 ↑ 1.0 1 175

Index Scan using legal_person_pk on legal_person lp_3 (cost=0.29..0.48 rows=1 width=106) (actual time=0.002..0.002 rows=1 loops=175)

  • Index Cond: (id = pv_3.id)
  • Buffers: shared hit=525
197. 0.003 0.008 ↑ 1.0 4 1

Hash (cost=1.60..1.60 rows=4 width=8) (actual time=0.008..0.008 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
198. 0.005 0.005 ↑ 1.0 4 1

Seq Scan on person_type tpt (cost=0.00..1.60 rows=4 width=8) (actual time=0.004..0.005 rows=4 loops=1)

  • Buffers: shared hit=1
199. 0.055 0.055 ↓ 1.9 182 1

Index Scan using terrdivtr_terrdivlang_uq_i on territorial_division_translat tdt (cost=0.14..19.60 rows=94 width=38) (actual time=0.008..0.055 rows=182 loops=1)

  • Index Cond: (languages_id = '1'::bigint)
  • Buffers: shared hit=3
200. 0.076 0.152 ↓ 1.0 377 1

Hash (cost=41.90..41.90 rows=371 width=16) (actual time=0.152..0.152 rows=377 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 26kB
  • Buffers: shared hit=4
201. 0.076 0.076 ↓ 1.0 377 1

Seq Scan on person_category_link pcl (cost=0.00..41.90 rows=371 width=16) (actual time=0.015..0.076 rows=377 loops=1)

  • Buffers: shared hit=4
202. 5.772 5.772 ↑ 1.0 1 5,772

Index Scan using person_category_pk on person_category pc (cost=0.14..0.26 rows=1 width=10) (actual time=0.001..0.001 rows=1 loops=5,772)

  • Index Cond: (id = pcl.person_category_id)
  • Buffers: shared hit=11544
203. 66.421 167.722 ↓ 31.5 26,950 1

Hash Join (cost=1,372.92..14,297.37 rows=855 width=178) (actual time=72.482..167.722 rows=26,950 loops=1)

  • Hash Cond: ("substring"((usrp_1.oktmo)::text, 1, 3) = (tdoktmo_1.oktmo)::text)
  • Buffers: shared hit=14857
204. 28.882 28.882 ↓ 1.0 62,909 1

CTE Scan on usrp usrp_1 (cost=0.00..12,525.80 rows=62,629 width=40) (actual time=0.001..28.882 rows=62,909 loops=1)

205. 12.853 72.419 ↓ 384.8 5,772 1

Hash (cost=1,371.38..1,371.38 rows=15 width=175) (actual time=72.419..72.419 rows=5,772 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 2293kB
  • Buffers: shared hit=14857
206. 22.522 59.566 ↓ 384.8 5,772 1

Nested Loop (cost=851.07..1,371.38 rows=15 width=175) (actual time=7.320..59.566 rows=5,772 loops=1)

  • Buffers: shared hit=14857
207. 1.546 13.956 ↓ 384.8 5,772 1

Hash Join (cost=850.93..1,366.03 rows=15 width=173) (actual time=7.303..13.956 rows=5,772 loops=1)

  • Hash Cond: (tdl_1.person_id = pcl_1.person_id)
  • Buffers: shared hit=3313
208. 2.296 12.275 ↓ 2.5 2,201 1

Hash Join (cost=771.00..975.22 rows=886 width=189) (actual time=7.161..12.275 rows=2,201 loops=1)

  • Hash Cond: (tdoktmo_1.territorial_division_id = tdt_1.territorial_division_id)
  • Buffers: shared hit=3309
209. 4.224 4.224 ↑ 1.0 1,099 1

Seq Scan on territorial_division_oktmo tdoktmo_1 (cost=0.00..118.30 rows=1,099 width=13) (actual time=0.018..4.224 rows=1,099 loops=1)

  • Buffers: shared hit=7
210. 0.070 5.755 ↓ 2.5 175 1

Hash (cost=763.83..763.83 rows=70 width=200) (actual time=5.755..5.755 rows=175 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 59kB
  • Buffers: shared hit=3302
211. 0.096 5.685 ↓ 2.5 175 1

Merge Join (cost=717.07..763.83 rows=70 width=200) (actual time=5.459..5.685 rows=175 loops=1)

  • Merge Cond: (td_1.id = tdt_1.territorial_division_id)
  • Buffers: shared hit=3302
212. 0.079 5.547 ↓ 2.5 175 1

Merge Join (cost=716.93..736.82 rows=70 width=162) (actual time=5.444..5.547 rows=175 loops=1)

  • Merge Cond: (td_1.id = tdl_1.territorial_division_id)
  • Buffers: shared hit=3299
213. 0.030 0.030 ↑ 1.0 94 1

Index Only Scan using territorial_division_pk on territorial_division td_1 (cost=0.14..13.61 rows=94 width=8) (actual time=0.021..0.030 rows=94 loops=1)

  • Heap Fetches: 0
  • Buffers: shared hit=2
214. 0.144 5.438 ↓ 2.5 175 1

Sort (cost=715.62..715.79 rows=70 width=154) (actual time=5.416..5.438 rows=175 loops=1)

  • Sort Key: tdl_1.territorial_division_id
  • Sort Method: quicksort Memory: 90kB
  • Buffers: shared hit=3297
215. 0.099 5.294 ↓ 2.5 175 1

Hash Join (cost=2.88..713.47 rows=70 width=154) (actual time=0.079..5.294 rows=175 loops=1)

  • Hash Cond: (p_4.type_id = tpt_1.id)
  • Buffers: shared hit=3297
216. 1.956 5.187 ↓ 2.5 175 1

Nested Loop (cost=0.86..704.20 rows=70 width=154) (actual time=0.064..5.187 rows=175 loops=1)

  • Buffers: shared hit=3296
217. 0.067 2.881 ↓ 1.2 175 1

Nested Loop (cost=0.58..617.86 rows=148 width=56) (actual time=0.054..2.881 rows=175 loops=1)

  • Join Filter: (tdl_1.person_id = pv_4.person_id)
  • Buffers: shared hit=2771
218. 0.138 0.539 ↑ 1.0 175 1

Nested Loop (cost=0.29..434.13 rows=175 width=40) (actual time=0.036..0.539 rows=175 loops=1)

  • Buffers: shared hit=527
219. 0.051 0.051 ↑ 1.0 175 1

Seq Scan on person_terrdivision_link tdl_1 (cost=0.00..19.90 rows=175 width=16) (actual time=0.023..0.051 rows=175 loops=1)

  • Buffers: shared hit=2
220. 0.350 0.350 ↑ 1.0 1 175

Index Scan using person_pk on person p_4 (cost=0.29..2.27 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=175)

  • Index Cond: (id = tdl_1.person_id)
  • Buffers: shared hit=525
221. 2.275 2.275 ↑ 1.0 1 175

Index Scan using personver_person_fk_i on person_version pv_4 (cost=0.29..0.95 rows=1 width=16) (actual time=0.002..0.013 rows=1 loops=175)

  • Index Cond: (person_id = p_4.id)
  • Filter: ((statement_timestamp() >= start_date) AND (statement_timestamp() <= end_date))
  • Rows Removed by Filter: 13
  • Buffers: shared hit=2244
222. 0.350 0.350 ↑ 1.0 1 175

Index Scan using legal_person_pk on legal_person lp_4 (cost=0.29..0.48 rows=1 width=106) (actual time=0.002..0.002 rows=1 loops=175)

  • Index Cond: (id = pv_4.id)
  • Buffers: shared hit=525
223. 0.001 0.008 ↑ 1.0 4 1

Hash (cost=1.60..1.60 rows=4 width=8) (actual time=0.008..0.008 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
224. 0.007 0.007 ↑ 1.0 4 1

Seq Scan on person_type tpt_1 (cost=0.00..1.60 rows=4 width=8) (actual time=0.005..0.007 rows=4 loops=1)

  • Buffers: shared hit=1
225. 0.042 0.042 ↓ 1.9 182 1

Index Scan using terrdivtr_terrdivlang_uq_i on territorial_division_translat tdt_1 (cost=0.14..19.60 rows=94 width=38) (actual time=0.009..0.042 rows=182 loops=1)

  • Index Cond: (languages_id = '1'::bigint)
  • Buffers: shared hit=3
226. 0.054 0.135 ↓ 1.0 377 1

Hash (cost=41.90..41.90 rows=371 width=16) (actual time=0.135..0.135 rows=377 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 26kB
  • Buffers: shared hit=4
227. 0.081 0.081 ↓ 1.0 377 1

Seq Scan on person_category_link pcl_1 (cost=0.00..41.90 rows=371 width=16) (actual time=0.013..0.081 rows=377 loops=1)

  • Buffers: shared hit=4
228. 23.088 23.088 ↑ 1.0 1 5,772

Index Scan using person_category_pk on person_category pc_1 (cost=0.14..0.26 rows=1 width=10) (actual time=0.004..0.004 rows=1 loops=5,772)

  • Index Cond: (id = pcl_1.person_category_id)
  • Buffers: shared hit=11544
229. 50.537 141.531 ↑ 3.2 265 1

Hash Join (cost=1,372.92..14,297.37 rows=855 width=178) (actual time=58.528..141.531 rows=265 loops=1)

  • Hash Cond: ("substring"((usrp_2.oktmo)::text, 1, 5) = (tdoktmo_2.oktmo)::text)
  • Buffers: shared hit=14857
230. 32.962 32.962 ↓ 1.0 62,909 1

CTE Scan on usrp usrp_2 (cost=0.00..12,525.80 rows=62,629 width=40) (actual time=0.001..32.962 rows=62,909 loops=1)

231. 7.947 58.032 ↓ 384.8 5,772 1

Hash (cost=1,371.38..1,371.38 rows=15 width=175) (actual time=58.032..58.032 rows=5,772 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 2293kB
  • Buffers: shared hit=14857
232. 7.021 50.085 ↓ 384.8 5,772 1

Nested Loop (cost=851.07..1,371.38 rows=15 width=175) (actual time=8.587..50.085 rows=5,772 loops=1)

  • Buffers: shared hit=14857
233. 3.532 14.204 ↓ 384.8 5,772 1

Hash Join (cost=850.93..1,366.03 rows=15 width=173) (actual time=8.573..14.204 rows=5,772 loops=1)

  • Hash Cond: (tdl_2.person_id = pcl_2.person_id)
  • Buffers: shared hit=3313
234. 1.760 10.382 ↓ 2.5 2,201 1

Hash Join (cost=771.00..975.22 rows=886 width=189) (actual time=8.270..10.382 rows=2,201 loops=1)

  • Hash Cond: (tdoktmo_2.territorial_division_id = tdt_2.territorial_division_id)
  • Buffers: shared hit=3309
235. 0.375 0.375 ↑ 1.0 1,099 1

Seq Scan on territorial_division_oktmo tdoktmo_2 (cost=0.00..118.30 rows=1,099 width=13) (actual time=0.008..0.375 rows=1,099 loops=1)

  • Buffers: shared hit=7
236. 0.167 8.247 ↓ 2.5 175 1

Hash (cost=763.83..763.83 rows=70 width=200) (actual time=8.247..8.247 rows=175 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 59kB
  • Buffers: shared hit=3302
237. 0.171 8.080 ↓ 2.5 175 1

Merge Join (cost=717.07..763.83 rows=70 width=200) (actual time=7.607..8.080 rows=175 loops=1)

  • Merge Cond: (td_2.id = tdt_2.territorial_division_id)
  • Buffers: shared hit=3302
238. 0.149 7.796 ↓ 2.5 175 1

Merge Join (cost=716.93..736.82 rows=70 width=162) (actual time=7.580..7.796 rows=175 loops=1)

  • Merge Cond: (td_2.id = tdl_2.territorial_division_id)
  • Buffers: shared hit=3299
239. 0.041 0.041 ↑ 1.0 94 1

Index Only Scan using territorial_division_pk on territorial_division td_2 (cost=0.14..13.61 rows=94 width=8) (actual time=0.018..0.041 rows=94 loops=1)

  • Heap Fetches: 0
  • Buffers: shared hit=2
240. 0.314 7.606 ↓ 2.5 175 1

Sort (cost=715.62..715.79 rows=70 width=154) (actual time=7.550..7.606 rows=175 loops=1)

  • Sort Key: tdl_2.territorial_division_id
  • Sort Method: quicksort Memory: 90kB
  • Buffers: shared hit=3297
241. 0.192 7.292 ↓ 2.5 175 1

Hash Join (cost=2.88..713.47 rows=70 width=154) (actual time=0.107..7.292 rows=175 loops=1)

  • Hash Cond: (p_5.type_id = tpt_2.id)
  • Buffers: shared hit=3297
242. 0.256 7.086 ↓ 2.5 175 1

Nested Loop (cost=0.86..704.20 rows=70 width=154) (actual time=0.082..7.086 rows=175 loops=1)

  • Buffers: shared hit=3296
243. 0.334 6.130 ↓ 1.2 175 1

Nested Loop (cost=0.58..617.86 rows=148 width=56) (actual time=0.065..6.130 rows=175 loops=1)

  • Join Filter: (tdl_2.person_id = pv_5.person_id)
  • Buffers: shared hit=2771
244. 0.290 1.071 ↑ 1.0 175 1

Nested Loop (cost=0.29..434.13 rows=175 width=40) (actual time=0.036..1.071 rows=175 loops=1)

  • Buffers: shared hit=527
245. 0.081 0.081 ↑ 1.0 175 1

Seq Scan on person_terrdivision_link tdl_2 (cost=0.00..19.90 rows=175 width=16) (actual time=0.009..0.081 rows=175 loops=1)

  • Buffers: shared hit=2
246. 0.700 0.700 ↑ 1.0 1 175

Index Scan using person_pk on person p_5 (cost=0.29..2.27 rows=1 width=24) (actual time=0.004..0.004 rows=1 loops=175)

  • Index Cond: (id = tdl_2.person_id)
  • Buffers: shared hit=525
247. 4.725 4.725 ↑ 1.0 1 175

Index Scan using personver_person_fk_i on person_version pv_5 (cost=0.29..0.95 rows=1 width=16) (actual time=0.005..0.027 rows=1 loops=175)

  • Index Cond: (person_id = p_5.id)
  • Filter: ((statement_timestamp() >= start_date) AND (statement_timestamp() <= end_date))
  • Rows Removed by Filter: 13
  • Buffers: shared hit=2244
248. 0.700 0.700 ↑ 1.0 1 175

Index Scan using legal_person_pk on legal_person lp_5 (cost=0.29..0.48 rows=1 width=106) (actual time=0.004..0.004 rows=1 loops=175)

  • Index Cond: (id = pv_5.id)
  • Buffers: shared hit=525
249. 0.005 0.014 ↑ 1.0 4 1

Hash (cost=1.60..1.60 rows=4 width=8) (actual time=0.014..0.014 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
250. 0.009 0.009 ↑ 1.0 4 1

Seq Scan on person_type tpt_2 (cost=0.00..1.60 rows=4 width=8) (actual time=0.007..0.009 rows=4 loops=1)

  • Buffers: shared hit=1
251. 0.113 0.113 ↓ 1.9 182 1

Index Scan using terrdivtr_terrdivlang_uq_i on territorial_division_translat tdt_2 (cost=0.14..19.60 rows=94 width=38) (actual time=0.017..0.113 rows=182 loops=1)

  • Index Cond: (languages_id = '1'::bigint)
  • Buffers: shared hit=3
252. 0.126 0.290 ↓ 1.0 377 1

Hash (cost=41.90..41.90 rows=371 width=16) (actual time=0.290..0.290 rows=377 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 26kB
  • Buffers: shared hit=4
253. 0.164 0.164 ↓ 1.0 377 1

Seq Scan on person_category_link pcl_2 (cost=0.00..41.90 rows=371 width=16) (actual time=0.029..0.164 rows=377 loops=1)

  • Buffers: shared hit=4
254. 28.860 28.860 ↑ 1.0 1 5,772

Index Scan using person_category_pk on person_category pc_2 (cost=0.14..0.26 rows=1 width=10) (actual time=0.005..0.005 rows=1 loops=5,772)

  • Index Cond: (id = pcl_2.person_category_id)
  • Buffers: shared hit=11544
255.          

CTE epg_format

256. 0.019 0.123 ↑ 7.0 7 1

Nested Loop (cost=2.27..22.90 rows=49 width=75) (actual time=0.084..0.123 rows=7 loops=1)

  • Buffers: shared hit=9
257. 0.040 0.040 ↑ 1.0 2 1

Seq Scan on person_category pc_3 (cost=0.00..2.74 rows=2 width=75) (actual time=0.035..0.040 rows=2 loops=1)

  • Filter: ((code)::text = ANY ('{8,9}'::text[]))
  • Rows Removed by Filter: 13
  • Buffers: shared hit=1
258. 0.030 0.064 ↑ 6.2 4 2

Bitmap Heap Scan on person_category_link pcl_3 (cost=2.27..7.58 rows=25 width=16) (actual time=0.027..0.032 rows=4 loops=2)

  • Recheck Cond: (person_category_id = pc_3.id)
  • Heap Blocks: exact=4
  • Buffers: shared hit=8
259. 0.034 0.034 ↑ 6.2 4 2

Bitmap Index Scan on pcatlink_perscat_fk_i (cost=0.00..2.26 rows=25 width=0) (actual time=0.017..0.017 rows=4 loops=2)

  • Index Cond: (person_category_id = pc_3.id)
  • Buffers: shared hit=4
260.          

CTE repr_pers

261. 382.312 5,953.618 ↓ 1.0 62,911 1

Hash Left Join (cost=48,527.48..110,128.00 rows=62,629 width=2,592) (actual time=5,085.854..5,953.618 rows=62,911 loops=1)

  • Hash Cond: (p_6.id = epg.person_id)
  • Buffers: shared hit=170343, temp read=18995 written=31360
262. 50.705 5,571.163 ↓ 1.0 62,911 1

Hash Left Join (cost=48,512.66..92,797.71 rows=62,629 width=2,249) (actual time=5,085.585..5,571.163 rows=62,911 loops=1)

  • Hash Cond: (pv_6.id = csms_1.user_person_version_id)
  • Buffers: shared hit=170334, temp read=18995 written=31360
263. 50.513 5,266.833 ↓ 1.0 62,911 1

Hash Left Join (cost=48,460.72..92,510.81 rows=62,629 width=1,725) (actual time=4,831.926..5,266.833 rows=62,911 loops=1)

  • Hash Cond: (pv_6.id = tu.user_person_version_id)
  • Buffers: shared hit=170334, temp read=9698 written=31359
264. 33.657 568.567 ↓ 1.0 62,911 1

Hash Left Join (cost=48,408.78..92,223.91 rows=62,629 width=1,193) (actual time=184.148..568.567 rows=62,911 loops=1)

  • Hash Cond: (p_6.id = u_1.person_id)
  • Buffers: shared hit=86084
265. 26.114 533.067 ↓ 1.0 62,909 1

Hash Left Join (cost=47,410.17..89,616.76 rows=62,629 width=1,185) (actual time=182.268..533.067 rows=62,909 loops=1)

  • Hash Cond: (i_3.identity_doc_type_id = idt.id)
  • Buffers: shared hit=86008
266. 52.572 506.902 ↓ 1.0 62,909 1

Hash Left Join (cost=47,404.51..88,701.94 rows=62,629 width=1,127) (actual time=182.202..506.902 rows=62,909 loops=1)

  • Hash Cond: (pv_6.id = ofp.id)
  • Buffers: shared hit=86006
267. 44.930 287.985 ↓ 1.0 62,909 1

Hash Join (cost=6,857.05..45,243.12 rows=62,629 width=799) (actual time=15.724..287.985 rows=62,909 loops=1)

  • Hash Cond: (pv_6.person_id = p_6.id)
  • Buffers: shared hit=53538
268. 37.212 227.515 ↓ 1.0 62,909 1

Merge Left Join (cost=1.74..31,890.05 rows=62,629 width=781) (actual time=0.057..227.515 rows=62,909 loops=1)

  • Merge Cond: (pv_6.id = i_3.id)
  • Buffers: shared hit=53355
269. 37.776 172.284 ↓ 1.0 62,909 1

Merge Left Join (cost=1.45..23,991.81 rows=62,629 width=589) (actual time=0.046..172.284 rows=62,909 loops=1)

  • Merge Cond: (pv_6.id = lp_6.id)
  • Buffers: shared hit=51435
270. 41.529 114.702 ↓ 1.0 62,909 1

Merge Left Join (cost=0.86..16,481.07 rows=62,629 width=420) (actual time=0.035..114.702 rows=62,909 loops=1)

  • Merge Cond: (pv_6.id = sp_1.id)
  • Buffers: shared hit=46671
271. 38.745 38.745 ↓ 1.0 62,909 1

Index Scan using person_version_pk on person_version pv_6 (cost=0.29..9,848.48 rows=62,629 width=200) (actual time=0.011..38.745 rows=62,909 loops=1)

  • Buffers: shared hit=24569
272. 4.895 34.428 ↓ 1.0 6,978 1

Materialize (cost=0.57..5,764.16 rows=6,945 width=228) (actual time=0.022..34.428 rows=6,978 loops=1)

  • Buffers: shared hit=22102
273. 5.166 29.533 ↓ 1.0 6,978 1

Nested Loop Left Join (cost=0.57..5,746.79 rows=6,945 width=228) (actual time=0.015..29.533 rows=6,978 loops=1)

  • Buffers: shared hit=22102
274. 3.433 3.433 ↓ 1.0 6,978 1

Index Scan using selfemployed_person_pk on selfemployed_person sp_1 (cost=0.28..1,001.06 rows=6,945 width=162) (actual time=0.008..3.433 rows=6,978 loops=1)

  • Buffers: shared hit=1137
275. 20.934 20.934 ↑ 1.0 1 6,978

Index Scan using individual_pk on individual spi (cost=0.29..0.58 rows=1 width=82) (actual time=0.002..0.003 rows=1 loops=6,978)

  • Index Cond: (sp_1.individual_id = id)
  • Buffers: shared hit=20965
276. 19.806 19.806 ↓ 1.0 29,885 1

Index Scan using legal_person_pk on legal_person lp_6 (cost=0.29..4,335.41 rows=29,832 width=177) (actual time=0.009..19.806 rows=29,885 loops=1)

  • Buffers: shared hit=4764
277. 18.019 18.019 ↑ 1.0 33,020 1

Index Scan using individual_pk on individual i_3 (cost=0.29..4,430.74 rows=33,460 width=200) (actual time=0.007..18.019 rows=33,020 loops=1)

  • Buffers: shared hit=1920
278. 5.408 15.540 ↓ 1.0 22,125 1

Hash (cost=4,634.65..4,634.65 rows=21,665 width=18) (actual time=15.540..15.540 rows=22,125 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1327kB
  • Buffers: shared hit=183
279. 7.695 10.132 ↓ 1.0 22,125 1

Hash Join (cost=2.01..4,634.65 rows=21,665 width=18) (actual time=0.027..10.132 rows=22,125 loops=1)

  • Hash Cond: (p_6.type_id = pt_3.id)
  • Buffers: shared hit=183
280. 2.429 2.429 ↓ 1.0 22,125 1

Seq Scan on person p_6 (cost=0.00..2,384.90 rows=21,665 width=24) (actual time=0.006..2.429 rows=22,125 loops=1)

  • Buffers: shared hit=182
281. 0.003 0.008 ↑ 1.0 4 1

Hash (cost=1.60..1.60 rows=4 width=10) (actual time=0.008..0.008 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
282. 0.005 0.005 ↑ 1.0 4 1

Seq Scan on person_type pt_3 (cost=0.00..1.60 rows=4 width=10) (actual time=0.003..0.005 rows=4 loops=1)

  • Buffers: shared hit=1
283. 20.831 166.345 ↑ 1.0 25,987 1

Hash (cost=37,804.05..37,804.05 rows=26,765 width=336) (actual time=166.345..166.345 rows=25,987 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 9081kB
  • Buffers: shared hit=32468
284. 10.111 145.514 ↑ 1.0 25,987 1

Hash Left Join (cost=16,857.19..37,804.05 rows=26,765 width=336) (actual time=52.679..145.514 rows=25,987 loops=1)

  • Hash Cond: (ofplpv.person_id = ofplpvp.id)
  • Buffers: shared hit=32468
285. 11.553 127.317 ↑ 1.0 25,987 1

Merge Right Join (cost=12,251.62..30,421.62 rows=26,765 width=328) (actual time=44.545..127.317 rows=25,987 loops=1)

  • Merge Cond: (ofplp.id = ofp.legal_person_id)
  • Buffers: shared hit=32286
286. 28.116 65.502 ↓ 1.0 29,885 1

Merge Left Join (cost=0.58..17,398.24 rows=29,832 width=190) (actual time=0.023..65.502 rows=29,885 loops=1)

  • Merge Cond: (ofplp.id = ofplpv.id)
  • Buffers: shared hit=29332
287. 9.410 9.410 ↓ 1.0 29,885 1

Index Scan using legal_person_pk on legal_person ofplp (cost=0.29..4,335.41 rows=29,832 width=79) (actual time=0.011..9.410 rows=29,885 loops=1)

  • Buffers: shared hit=4764
288. 27.976 27.976 ↓ 1.0 62,881 1

Index Scan using person_version_pk on person_version ofplpv (cost=0.29..9,848.48 rows=62,629 width=119) (actual time=0.008..27.976 rows=62,881 loops=1)

  • Buffers: shared hit=24568
289. 19.435 50.262 ↑ 1.0 25,987 1

Sort (cost=12,251.05..12,317.96 rows=26,765 width=146) (actual time=44.517..50.262 rows=25,987 loops=1)

  • Sort Key: ofp.legal_person_id
  • Sort Method: quicksort Memory: 5802kB
  • Buffers: shared hit=2954
290. 14.712 30.827 ↑ 1.0 25,987 1

Merge Left Join (cost=0.58..10,282.74 rows=26,765 width=146) (actual time=0.022..30.827 rows=25,987 loops=1)

  • Merge Cond: (ofp.individual_id = ofpi.id)
  • Buffers: shared hit=2954
291. 6.255 6.255 ↑ 1.0 25,987 1

Index Scan using official_individual_fk_i on official_person ofp (cost=0.29..3,337.53 rows=26,765 width=80) (actual time=0.011..6.255 rows=25,987 loops=1)

  • Buffers: shared hit=1034
292. 9.860 9.860 ↑ 1.0 33,020 1

Index Scan using individual_pk on individual ofpi (cost=0.29..4,430.74 rows=33,460 width=82) (actual time=0.009..9.860 rows=33,020 loops=1)

  • Buffers: shared hit=1920
293. 4.142 8.086 ↓ 1.0 22,125 1

Hash (cost=2,384.90..2,384.90 rows=21,665 width=16) (actual time=8.086..8.086 rows=22,125 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1284kB
  • Buffers: shared hit=182
294. 3.944 3.944 ↓ 1.0 22,125 1

Seq Scan on person ofplpvp (cost=0.00..2,384.90 rows=21,665 width=16) (actual time=0.012..3.944 rows=22,125 loops=1)

  • Buffers: shared hit=182
295. 0.007 0.051 ↑ 1.0 6 1

Hash (cost=5.05..5.05 rows=6 width=74) (actual time=0.051..0.051 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=2
296. 0.007 0.044 ↑ 1.0 6 1

Merge Join (cost=4.39..5.05 rows=6 width=74) (actual time=0.039..0.044 rows=6 loops=1)

  • Merge Cond: (idt.id = idtt.identity_document_type_id)
  • Buffers: shared hit=2
297. 0.008 0.021 ↑ 1.0 6 1

Sort (cost=1.88..1.89 rows=6 width=8) (actual time=0.021..0.021 rows=6 loops=1)

  • Sort Key: idt.id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=1
298. 0.013 0.013 ↑ 1.0 6 1

Seq Scan on identity_document_type idt (cost=0.00..1.80 rows=6 width=8) (actual time=0.011..0.013 rows=6 loops=1)

  • Buffers: shared hit=1
299. 0.009 0.016 ↑ 1.0 6 1

Sort (cost=2.51..2.52 rows=6 width=74) (actual time=0.015..0.016 rows=6 loops=1)

  • Sort Key: idtt.identity_document_type_id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=1
300. 0.007 0.007 ↑ 1.0 6 1

Seq Scan on identity_document_type_translat idtt (cost=0.00..2.43 rows=6 width=74) (actual time=0.005..0.007 rows=6 loops=1)

  • Filter: (languages_id = '1'::bigint)
  • Rows Removed by Filter: 6
  • Buffers: shared hit=1
301. 0.962 1.843 ↓ 1.2 5,166 1

Hash (cost=539.30..539.30 rows=4,481 width=16) (actual time=1.843..1.843 rows=5,166 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 307kB
  • Buffers: shared hit=76
302. 0.881 0.881 ↓ 1.2 5,166 1

Seq Scan on "user" u_1 (cost=0.00..539.30 rows=4,481 width=16) (actual time=0.017..0.881 rows=5,166 loops=1)

  • Buffers: shared hit=76
303. 20.640 4,647.753 ↓ 44,185.0 44,185 1

Hash (cost=51.84..51.84 rows=1 width=540) (actual time=4,647.753..4,647.753 rows=44,185 loops=1)

  • Buckets: 65536 (originally 1024) Batches: 1 (originally 1) Memory Usage: 7426kB
  • Buffers: shared hit=84250, temp read=9698 written=31359
304. 4,627.113 4,627.113 ↓ 44,185.0 44,185 1

CTE Scan on tu_csms tu (cost=0.00..51.84 rows=1 width=540) (actual time=3,954.315..4,627.113 rows=44,185 loops=1)

  • Filter: ((person_category_code)::text = '1'::text)
  • Rows Removed by Filter: 266144
  • Buffers: shared hit=84250, temp read=9698 written=31359
305. 36.453 253.625 ↓ 44,185.0 44,185 1

Hash (cost=51.84..51.84 rows=1 width=532) (actual time=253.625..253.625 rows=44,185 loops=1)

  • Buckets: 65536 (originally 1024) Batches: 1 (originally 1) Memory Usage: 12137kB
  • Buffers: temp read=9297 written=1
306. 217.172 217.172 ↓ 44,185.0 44,185 1

CTE Scan on tu_csms csms_1 (cost=0.00..51.84 rows=1 width=532) (actual time=0.060..217.172 rows=44,185 loops=1)

  • Filter: ((person_category_code)::text = '5'::text)
  • Rows Removed by Filter: 266144
  • Buffers: temp read=9297 written=1
307. 0.006 0.143 ↑ 7.0 7 1

Hash (cost=9.80..9.80 rows=49 width=602) (actual time=0.143..0.143 rows=7 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=9
308. 0.137 0.137 ↑ 7.0 7 1

CTE Scan on epg_format epg (cost=0.00..9.80 rows=49 width=602) (actual time=0.090..0.137 rows=7 loops=1)

  • Buffers: shared hit=9
309. 0.007 0.314 ↑ 1.0 1 1

Hash (cost=47.93..47.93 rows=1 width=1,415) (actual time=0.314..0.314 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=57
310. 0.004 0.307 ↑ 1.0 1 1

Nested Loop Left Join (cost=14.70..47.93 rows=1 width=1,415) (actual time=0.294..0.307 rows=1 loops=1)

  • Buffers: shared hit=57
311. 0.003 0.254 ↑ 1.0 1 1

Nested Loop Left Join (cost=11.98..39.11 rows=1 width=1,319) (actual time=0.244..0.254 rows=1 loops=1)

  • Buffers: shared hit=40
312. 0.006 0.187 ↑ 1.0 1 1

Nested Loop Left Join (cost=9.83..31.54 rows=1 width=1,279) (actual time=0.180..0.187 rows=1 loops=1)

  • Buffers: shared hit=23
313. 0.004 0.173 ↑ 1.0 1 1

Nested Loop Left Join (cost=9.55..27.44 rows=1 width=1,119) (actual time=0.167..0.173 rows=1 loops=1)

  • Buffers: shared hit=20
314. 0.001 0.169 ↑ 1.0 1 1

Nested Loop Left Join (cost=9.26..23.35 rows=1 width=991) (actual time=0.163..0.169 rows=1 loops=1)

  • Buffers: shared hit=20
315. 0.004 0.167 ↑ 1.0 1 1

Nested Loop Left Join (cost=8.97..22.30 rows=1 width=991) (actual time=0.161..0.167 rows=1 loops=1)

  • Buffers: shared hit=20
316. 0.005 0.163 ↑ 1.0 1 1

Nested Loop Left Join (cost=8.68..21.78 rows=1 width=991) (actual time=0.157..0.163 rows=1 loops=1)

  • Buffers: shared hit=20
317. 0.005 0.158 ↑ 1.0 1 1

Nested Loop Left Join (cost=8.40..17.69 rows=1 width=983) (actual time=0.152..0.158 rows=1 loops=1)

  • Buffers: shared hit=20
318. 0.007 0.075 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.12..10.21 rows=1 width=422) (actual time=0.070..0.075 rows=1 loops=1)

  • Buffers: shared hit=15
319. 0.005 0.062 ↑ 1.0 1 1

Nested Loop (cost=0.99..9.60 rows=1 width=345) (actual time=0.058..0.062 rows=1 loops=1)

  • Join Filter: (srs.id = srst.service_request_status_id)
  • Buffers: shared hit=13
320. 0.003 0.052 ↑ 1.0 1 1

Nested Loop (cost=0.85..9.18 rows=1 width=329) (actual time=0.049..0.052 rows=1 loops=1)

  • Buffers: shared hit=11
321. 0.007 0.045 ↑ 1.0 1 1

Nested Loop (cost=0.71..8.79 rows=1 width=311) (actual time=0.042..0.045 rows=1 loops=1)

  • Join Filter: (st.id = stt.service_type_id)
  • Buffers: shared hit=9
322. 0.003 0.033 ↑ 1.0 1 1

Nested Loop (cost=0.57..8.34 rows=1 width=194) (actual time=0.031..0.033 rows=1 loops=1)

  • Buffers: shared hit=7
323. 0.004 0.025 ↑ 1.0 1 1

Nested Loop (cost=0.43..7.94 rows=1 width=176) (actual time=0.024..0.025 rows=1 loops=1)

  • Buffers: shared hit=5
324. 0.016 0.016 ↑ 1.0 1 1

Index Scan using service_request_pk on service_request sr (cost=0.29..4.00 rows=1 width=160) (actual time=0.015..0.016 rows=1 loops=1)

  • Index Cond: (id = 173709)
  • Buffers: shared hit=3
325. 0.005 0.005 ↑ 1.0 1 1

Index Scan using service_req_type_status_pk on service_request_type_status srts (cost=0.14..3.85 rows=1 width=24) (actual time=0.005..0.005 rows=1 loops=1)

  • Index Cond: (id = sr.service_request_type_status_id)
  • Buffers: shared hit=2
326. 0.005 0.005 ↑ 1.0 1 1

Index Scan using service_type_pk on service_type st (cost=0.14..0.29 rows=1 width=18) (actual time=0.004..0.005 rows=1 loops=1)

  • Index Cond: (id = srts.service_type_id)
  • Buffers: shared hit=2
327. 0.005 0.005 ↑ 1.0 1 1

Index Scan using servtyptr_servtyplang_uq_i on service_type_translation stt (cost=0.14..0.35 rows=1 width=133) (actual time=0.005..0.005 rows=1 loops=1)

  • Index Cond: ((service_type_id = srts.service_type_id) AND (languages_id = '1'::bigint))
  • Buffers: shared hit=2
328. 0.004 0.004 ↑ 1.0 1 1

Index Scan using service_req_status_pk on service_request_status srs (cost=0.14..0.30 rows=1 width=18) (actual time=0.004..0.004 rows=1 loops=1)

  • Index Cond: (id = srts.service_request_status_id)
  • Buffers: shared hit=2
329. 0.005 0.005 ↑ 1.0 1 1

Index Scan using srvreqtstattr_srvreqtstlng_uq_i on service_request_status_translat srst (cost=0.14..0.32 rows=1 width=32) (actual time=0.004..0.005 rows=1 loops=1)

  • Index Cond: ((service_request_status_id = srts.service_request_status_id) AND (languages_id = '1'::bigint))
  • Buffers: shared hit=2
330. 0.006 0.006 ↑ 1.0 1 1

Index Scan using service_category_pk on service_category sct (cost=0.14..0.50 rows=1 width=53) (actual time=0.005..0.006 rows=1 loops=1)

  • Index Cond: (st.service_category_id = id)
  • Buffers: shared hit=2
331. 0.001 0.078 ↑ 1.0 1 1

Limit (cost=7.27..7.28 rows=1 width=569) (actual time=0.078..0.078 rows=1 loops=1)

  • Buffers: shared hit=5
332. 0.012 0.077 ↑ 1.0 1 1

Sort (cost=7.27..7.28 rows=1 width=569) (actual time=0.077..0.077 rows=1 loops=1)

  • Sort Key: sra_2.srvreq_answer_date DESC, sra_2.id DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=5
333. 0.003 0.065 ↑ 1.0 1 1

Merge Join (cost=7.04..7.26 rows=1 width=569) (actual time=0.064..0.065 rows=1 loops=1)

  • Merge Cond: (at_2.id = att_2.srvreq_answer_type_id)
  • Buffers: shared hit=5
334. 0.002 0.040 ↑ 1.0 1 1

Merge Join (cost=5.42..5.53 rows=1 width=550) (actual time=0.039..0.040 rows=1 loops=1)

  • Merge Cond: (sra_2.srvreq_answer_type_id = at_2.id)
  • Buffers: shared hit=4
335. 0.012 0.020 ↑ 1.0 1 1

Sort (cost=4.00..4.01 rows=1 width=540) (actual time=0.019..0.020 rows=1 loops=1)

  • Sort Key: sra_2.srvreq_answer_type_id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=3
336. 0.008 0.008 ↑ 1.0 1 1

Index Scan using srvreqansw_srvreq_fk_i on service_request_answer sra_2 (cost=0.29..4.00 rows=1 width=540) (actual time=0.008..0.008 rows=1 loops=1)

  • Index Cond: (sr.id = service_request_id)
  • Buffers: shared hit=3
337. 0.009 0.018 ↑ 1.0 2 1

Sort (cost=1.41..1.41 rows=2 width=10) (actual time=0.018..0.018 rows=2 loops=1)

  • Sort Key: at_2.id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=1
338. 0.009 0.009 ↑ 1.0 2 1

Seq Scan on srvreq_answer_type at_2 (cost=0.00..1.40 rows=2 width=10) (actual time=0.008..0.009 rows=2 loops=1)

  • Buffers: shared hit=1
339. 0.015 0.022 ↑ 1.0 2 1

Sort (cost=1.62..1.62 rows=2 width=27) (actual time=0.022..0.022 rows=2 loops=1)

  • Sort Key: att_2.srvreq_answer_type_id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=1
340. 0.007 0.007 ↑ 1.0 2 1

Seq Scan on srvreq_answer_type_translation att_2 (cost=0.00..1.61 rows=2 width=27) (actual time=0.006..0.007 rows=2 loops=1)

  • Filter: (languages_id = '1'::bigint)
  • Rows Removed by Filter: 2
  • Buffers: shared hit=1
341. 0.000 0.000 ↓ 0.0 0 1

Index Scan using user_pk on "user" u (cost=0.28..3.99 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=1)

  • Index Cond: (sr.creator_id = id)
342. 0.000 0.000 ↓ 0.0 0 1

Index Only Scan using person_pk on person p1 (cost=0.29..0.42 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=1)

  • Index Cond: (id = u.person_id)
  • Heap Fetches: 0
343. 0.001 0.001 ↓ 0.0 0 1

Index Scan using personver_person_fk_i on person_version pv1 (cost=0.29..0.95 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=1)

  • Index Cond: (p1.id = person_id)
  • Filter: ((statement_timestamp() >= start_date) AND (statement_timestamp() <= end_date))
344. 0.000 0.000 ↓ 0.0 0 1

Index Scan using legal_person_pk on legal_person tulp (cost=0.29..4.00 rows=1 width=136) (actual time=0.000..0.000 rows=0 loops=1)

  • Index Cond: (sr.territorial_id = id)
345. 0.008 0.008 ↑ 1.0 1 1

Index Scan using legal_person_pk on legal_person cslp (cost=0.29..4.00 rows=1 width=136) (actual time=0.008..0.008 rows=1 loops=1)

  • Index Cond: (sr.csms_branch_id = id)
  • Buffers: shared hit=3
346. 0.007 0.064 ↑ 1.0 1 1

Nested Loop Left Join (cost=2.14..7.46 rows=1 width=48) (actual time=0.062..0.064 rows=1 loops=1)

  • Buffers: shared hit=17
347. 0.002 0.057 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.85..6.88 rows=1 width=326) (actual time=0.055..0.057 rows=1 loops=1)

  • Buffers: shared hit=17
348. 0.003 0.050 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.57..6.37 rows=1 width=318) (actual time=0.048..0.050 rows=1 loops=1)

  • Buffers: shared hit=15
349. 0.004 0.043 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.28..5.85 rows=1 width=236) (actual time=0.041..0.043 rows=1 loops=1)

  • Buffers: shared hit=13
350. 0.004 0.035 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.99..5.36 rows=1 width=116) (actual time=0.034..0.035 rows=1 loops=1)

  • Buffers: shared hit=11
351. 0.002 0.027 ↑ 1.0 1 1

Nested Loop (cost=0.71..4.84 rows=1 width=10) (actual time=0.026..0.027 rows=1 loops=1)

  • Buffers: shared hit=8
352. 0.003 0.020 ↑ 1.0 1 1

Nested Loop (cost=0.58..4.50 rows=1 width=16) (actual time=0.019..0.020 rows=1 loops=1)

  • Buffers: shared hit=6
353. 0.009 0.009 ↑ 1.0 1 1

Index Scan using person_version_pk on person_version pv_1 (cost=0.29..4.00 rows=1 width=16) (actual time=0.009..0.009 rows=1 loops=1)

  • Index Cond: (id = sr.applicant_id)
  • Buffers: shared hit=3
354. 0.008 0.008 ↑ 1.0 1 1

Index Scan using person_pk on person p_1 (cost=0.29..0.40 rows=1 width=16) (actual time=0.007..0.008 rows=1 loops=1)

  • Index Cond: (id = pv_1.person_id)
  • Buffers: shared hit=3
355. 0.005 0.005 ↑ 1.0 1 1

Index Scan using person_type_pk on person_type pt_1 (cost=0.13..0.24 rows=1 width=10) (actual time=0.005..0.005 rows=1 loops=1)

  • Index Cond: (id = p_1.type_id)
  • Buffers: shared hit=2
356. 0.004 0.004 ↑ 1.0 1 1

Index Scan using legal_person_pk on legal_person lp_1 (cost=0.29..0.42 rows=1 width=106) (actual time=0.004..0.004 rows=1 loops=1)

  • Index Cond: (id = pv_1.id)
  • Buffers: shared hit=3
357. 0.004 0.004 ↓ 0.0 0 1

Index Scan using selfemployed_person_pk on selfemployed_person se_1 (cost=0.28..0.40 rows=1 width=128) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: (id = pv_1.id)
  • Buffers: shared hit=2
358. 0.004 0.004 ↓ 0.0 0 1

Index Scan using individual_pk on individual i_1 (cost=0.29..0.42 rows=1 width=82) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: (id = pv_1.id)
  • Buffers: shared hit=2
359. 0.005 0.005 ↓ 0.0 0 1

Index Scan using official_person_pk on official_person op_1 (cost=0.29..0.41 rows=1 width=24) (actual time=0.005..0.005 rows=0 loops=1)

  • Index Cond: (id = pv_1.id)
  • Buffers: shared hit=2
360. 0.000 0.000 ↓ 0.0 0 1

Index Scan using legal_person_pk on legal_person oplp_1 (cost=0.29..0.46 rows=1 width=106) (actual time=0.000..0.000 rows=0 loops=1)

  • Index Cond: (op_1.legal_person_id = id)
361. 0.007 0.049 ↑ 1.0 1 1

Nested Loop Left Join (cost=2.72..8.72 rows=1 width=112) (actual time=0.046..0.049 rows=1 loops=1)

  • Buffers: shared hit=17
362. 0.005 0.041 ↑ 1.0 1 1

Nested Loop Left Join (cost=2.43..8.15 rows=1 width=236) (actual time=0.038..0.041 rows=1 loops=1)

  • Buffers: shared hit=17
363. 0.002 0.035 ↑ 1.0 1 1

Nested Loop Left Join (cost=2.15..7.56 rows=1 width=438) (actual time=0.032..0.035 rows=1 loops=1)

  • Buffers: shared hit=17
364. 0.002 0.031 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.86..7.06 rows=1 width=422) (actual time=0.028..0.031 rows=1 loops=1)

  • Buffers: shared hit=15
365. 0.002 0.027 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.57..6.54 rows=1 width=340) (actual time=0.024..0.027 rows=1 loops=1)

  • Buffers: shared hit=13
366. 0.003 0.024 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.28..5.85 rows=1 width=274) (actual time=0.021..0.024 rows=1 loops=1)

  • Buffers: shared hit=13
367. 0.004 0.019 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.99..5.36 rows=1 width=146) (actual time=0.017..0.019 rows=1 loops=1)

  • Buffers: shared hit=11
368. 0.002 0.013 ↑ 1.0 1 1

Nested Loop (cost=0.71..4.84 rows=1 width=10) (actual time=0.012..0.013 rows=1 loops=1)

  • Buffers: shared hit=8
369. 0.004 0.008 ↑ 1.0 1 1

Nested Loop (cost=0.58..4.50 rows=1 width=16) (actual time=0.008..0.008 rows=1 loops=1)

  • Buffers: shared hit=6
370. 0.002 0.002 ↑ 1.0 1 1

Index Scan using person_version_pk on person_version pv (cost=0.29..4.00 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=1)

  • Index Cond: (id = COALESCE(pv1.id, sr.applicant_id))
  • Buffers: shared hit=3
371. 0.002 0.002 ↑ 1.0 1 1

Index Scan using person_pk on person p (cost=0.29..0.40 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=1)

  • Index Cond: (id = pv.person_id)
  • Buffers: shared hit=3
372. 0.003 0.003 ↑ 1.0 1 1

Index Scan using person_type_pk on person_type pt (cost=0.13..0.24 rows=1 width=10) (actual time=0.002..0.003 rows=1 loops=1)

  • Index Cond: (id = p.type_id)
  • Buffers: shared hit=2
373. 0.002 0.002 ↑ 1.0 1 1

Index Scan using legal_person_pk on legal_person lp (cost=0.29..0.42 rows=1 width=136) (actual time=0.002..0.002 rows=1 loops=1)

  • Index Cond: (id = pv.id)
  • Buffers: shared hit=3
374. 0.002 0.002 ↓ 0.0 0 1

Index Scan using selfemployed_person_pk on selfemployed_person se (cost=0.28..0.40 rows=1 width=128) (actual time=0.002..0.002 rows=0 loops=1)

  • Index Cond: (id = pv.id)
  • Buffers: shared hit=2
375. 0.001 0.001 ↓ 0.0 0 1

Index Scan using individual_pk on individual sei (cost=0.29..0.58 rows=1 width=82) (actual time=0.001..0.001 rows=0 loops=1)

  • Index Cond: (se.individual_id = id)
376. 0.002 0.002 ↓ 0.0 0 1

Index Scan using individual_pk on individual i (cost=0.29..0.42 rows=1 width=82) (actual time=0.002..0.002 rows=0 loops=1)

  • Index Cond: (id = pv.id)
  • Buffers: shared hit=2
377. 0.002 0.002 ↓ 0.0 0 1

Index Scan using official_person_pk on official_person op (cost=0.29..0.41 rows=1 width=24) (actual time=0.002..0.002 rows=0 loops=1)

  • Index Cond: (id = pv.id)
  • Buffers: shared hit=2
378. 0.001 0.001 ↓ 0.0 0 1

Index Scan using legal_person_pk on legal_person oplp (cost=0.29..0.46 rows=1 width=106) (actual time=0.001..0.001 rows=0 loops=1)

  • Index Cond: (op.legal_person_id = id)
379. 0.001 0.001 ↓ 0.0 0 1

Index Scan using individual_pk on individual opi (cost=0.29..0.45 rows=1 width=82) (actual time=0.001..0.001 rows=0 loops=1)

  • Index Cond: (op.individual_id = id)
Planning time : 168.410 ms