explain.depesz.com

PostgreSQL's explain analyze made readable

Result: naKn

Settings
# exclusive inclusive rows x rows loops node
1. 0.011 57.046 ↓ 4.0 4 1

Sort (cost=2,631.94..2,631.94 rows=1 width=636) (actual time=57.045..57.046 rows=4 loops=1)

  • Sort Key: aati.rnum, aati.merge_bit
  • Sort Method: quicksort Memory: 33kB
  • Buffers: shared hit=8863
2.          

CTE uag

3. 0.024 0.100 ↓ 1.1 94 1

Hash Join (cost=19.15..21.82 rows=86 width=4) (actual time=0.075..0.1 rows=94 loops=1)

  • Buffers: shared hit=6
4. 0.015 0.028 ↑ 1.0 96 1

Bitmap Heap Scan on user_group ug (cost=8.18..10.51 rows=96 width=4) (actual time=0.022..0.028 rows=96 loops=1)

  • Heap Blocks: exact=2
  • Buffers: shared hit=3
5. 0.013 0.013 ↑ 1.0 96 1

Bitmap Index Scan on user_group_user_no_group_no_idx_c (cost=0..8.17 rows=96 width=0) (actual time=0.013..0.013 rows=96 loops=1)

  • Index Cond: (user_no = 1)
  • Buffers: shared hit=1
6. 0.019 0.048 ↓ 1.1 118 1

Hash (cost=10.59..10.59 rows=111 width=4) (actual time=0.048..0.048 rows=118 loops=1)

  • Buffers: shared hit=3
7. 0.020 0.029 ↓ 1.1 118 1

Bitmap Heap Scan on agent_group ag (cost=8.2..10.59 rows=111 width=4) (actual time=0.015..0.029 rows=118 loops=1)

  • Heap Blocks: exact=2
  • Buffers: shared hit=3
8. 0.009 0.009 ↓ 1.2 128 1

Bitmap Index Scan on agent_group_is_enable_group_no_idx_c (cost=0..8.2 rows=111 width=0) (actual time=0.009..0.009 rows=128 loops=1)

  • Index Cond: (is_enable = 1)
  • Buffers: shared hit=1
9.          

CTE csa

10. 0.397 55.115 ↑ 1.1 310 1

Nested Loop (cost=15.3..2,511.5 rows=331 width=101) (actual time=0.827..55.115 rows=310 loops=1)

  • Buffers: shared hit=8516
11. 0.592 54.098 ↑ 1.2 310 1

Nested Loop (cost=15.22..133.12 rows=384 width=70) (actual time=0.819..54.098 rows=310 loops=1)

  • Buffers: shared hit=7120
12. 0.214 0.284 ↓ 3.0 598 1

HashAggregate (cost=2.39..2.99 rows=200 width=4) (actual time=0.171..0.284 rows=598 loops=1)

  • Group Key: "*VALUES*_1".column1
13. 0.070 0.070 ↑ 1.0 598 1

Values Scan (cost=0..2.09 rows=598 width=4) (actual time=0.001..0.07 rows=598 loops=1)

14. 5.438 53.222 ↑ 1.0 1 598

Hash Join (cost=12.83..13.41 rows=1 width=74) (actual time=0.084..0.089 rows=1 loops=598)

  • Buffers: shared hit=7120
15. 4.130 4.130 ↓ 1.1 94 590

CTE Scan on uag uag (cost=0..0.52 rows=86 width=4) (actual time=0..0.007 rows=94 loops=590)

  • Buffers: shared hit=6
16. 0.598 43.654 ↑ 1.0 1 598

Hash (cost=12.82..12.82 rows=1 width=74) (actual time=0.073..0.073 rows=1 loops=598)

  • Buffers: shared hit=7114
17. 0.161 43.056 ↑ 1.0 1 598

Nested Loop (cost=7.28..12.82 rows=1 width=74) (actual time=0.029..0.072 rows=1 loops=598)

  • Buffers: shared hit=7114
18. 1.196 1.196 ↑ 1.0 1 598

Index Scan using group_access_alink_no_idx on group_access ga (cost=0.06..0.27 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=598)

  • Index Cond: (alink_no = "*VALUES*_1".column1)
  • Buffers: shared hit=1849
19. 0.851 41.699 ↑ 1.0 1 851

Nested Loop (cost=7.23..12.55 rows=1 width=66) (actual time=0.027..0.049 rows=1 loops=851)

  • Buffers: shared hit=5265
20. 18.722 39.997 ↑ 1.0 1 851

Nested Loop (cost=7.2..12.5 rows=1 width=27) (actual time=0.026..0.047 rows=1 loops=851)

  • Buffers: shared hit=3563
21. 0.851 1.702 ↑ 1.0 1 851

Bitmap Heap Scan on asset_type_link atl (cost=6.13..10.13 rows=1 width=23) (actual time=0.002..0.002 rows=1 loops=851)

  • Heap Blocks: exact=851
  • Buffers: shared hit=3563
22. 0.851 0.851 ↑ 1.0 1 851

Bitmap Index Scan on asset_type_link_pkey (cost=0..6.13 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=851)

  • Index Cond: (alink_no = ga.alink_no)
  • Buffers: shared hit=2712
23. 19.540 19.573 ↓ 1.3 268 851

HashAggregate (cost=1.07..1.67 rows=200 width=4) (actual time=0..0.023 rows=268 loops=851)

  • Group Key: "*VALUES*".column1
24. 0.033 0.033 ↑ 1.0 268 1

Values Scan (cost=0..0.94 rows=268 width=4) (actual time=0.001..0.033 rows=268 loops=1)

25. 0.851 0.851 ↑ 1.0 1 851

Index Scan using audit_type_pkey on audit_type at (cost=0.03..0.04 rows=1 width=43) (actual time=0.001..0.001 rows=1 loops=851)

  • Index Cond: (atype_no = atl.atype_no)
  • Buffers: shared hit=1702
26. 0.620 0.620 ↑ 1.0 1 310

Index Scan using asset_info_pkey on asset_info ai (cost=0.08..6.19 rows=1 width=39) (actual time=0.002..0.002 rows=1 loops=310)

  • Index Cond: (asset_no = atl.asset_no)
  • Filter: (is_enable = 1)
  • Buffers: shared hit=1396
27.          

CTE att

28. 0.007 56.423 ↓ 5.0 5 1

Nested Loop (cost=89.52..89.56 rows=1 width=754) (actual time=56.375..56.423 rows=5 loops=1)

  • Buffers: shared hit=8851
29. 0.018 56.331 ↓ 5.0 5 1

Unique (cost=73.24..73.28 rows=1 width=750) (actual time=56.313..56.331 rows=5 loops=1)

  • Buffers: shared hit=8777
30. 0.035 56.313 ↓ 5.0 5 1

Sort (cost=73.24..73.24 rows=1 width=750) (actual time=56.313..56.313 rows=5 loops=1)

  • Sort Key: adgd.audit_parent_group_no, adgd.audit_name, adgd.is_oneshot, adgd.is_pi, adgd.current_aresult_no, adgd.audit_start_date, adgd.audit_end_date, adgd.audit_reg_date, adgd.audit_group_no, adgd.oneshot_info, adgd.alink_no, adgd.agent_group_no, adgd.group_name, adgd.template_need_merge, adgd.template_name, adgd.ss_os_type_all, adgd.ss_web_type_all, adgd.ss_db_type_all, adgd.ss_network_type_all, adgd.ss_application_type_all, adgd.ss_cloud_type_all, adgd.ss_hypervisor_type_all, adgd.atemplate_no, adgd.template_class, adgd.is_selected, adgd.merge_type, adgd.merge_bit, adgd.csa_asset_no, adgd.csa_atype_no, adgd.csa_type_name, adgd.csa_type_class, adgd.csa_alink_no, adgd.csa_group_no, adgd.hostname, adgd.ip, adgd.os, adgd.ss_os_type, adgd.ss_db_type, adgd.ss_web_type, adgd.ss_network_type, adgd.ss_application_type, adgd.ss_cloud_type, adgd.ss_hypervisor_type, adgd.ss_tag, adgd.docker_image_id, adgd.is_auditable_template, adgd.aresult_no, adgd.ahr_alink_no, adgd.ahr_atemplate_no, adgd.moddata_no, adgd.audit_done, adgd.report_create_date, adgd.delete_flag, adgd.createrpt_group_no, adgd.excel_path, adgd.analyze_start_date, adgd.raw_data, adgd.gather_status, adgd.gather_start_date, adgd.gather_reg_date, adgd.gather_with_stdout, adgd.gather_with_stderr, adgd.alink_template, adgd.asset_template, adgd.audit_history_order
  • Sort Method: quicksort Memory: 32kB
  • Buffers: shared hit=8777
31. 0.004 56.278 ↓ 5.0 5 1

Subquery Scan on adgd (cost=73.22..73.24 rows=1 width=750) (actual time=56.26..56.278 rows=5 loops=1)

  • Filter: (adgd.audit_history_order <= 1)
  • Buffers: shared hit=8777
32. 0.032 56.274 ↓ 5.0 5 1

WindowAgg (cost=73.22..73.24 rows=1 width=677) (actual time=56.258..56.274 rows=5 loops=1)

  • Buffers: shared hit=8777
33. 0.013 56.242 ↓ 5.0 5 1

Sort (cost=73.22..73.22 rows=1 width=677) (actual time=56.242..56.242 rows=5 loops=1)

  • Sort Key: adg.group_no, aga.group_no, csa.csa_alink_no, gr.atemplate_no, md.start_date, ar.start_date, adg.reg_date
  • Sort Method: quicksort Memory: 32kB
  • Buffers: shared hit=8777
34. 0.006 56.229 ↓ 5.0 5 1

Nested Loop (cost=58.69..73.22 rows=1 width=677) (actual time=23.804..56.229 rows=5 loops=1)

  • Buffers: shared hit=8777
35. 0.104 56.098 ↓ 5.0 5 1

Hash Join (cost=54.55..57.04 rows=1 width=433) (actual time=23.757..56.098 rows=5 loops=1)

  • Buffers: shared hit=8693
36. 55.334 55.334 ↑ 1.1 310 1

CTE Scan on csa csa (cost=0..1.99 rows=331 width=268) (actual time=0.828..55.334 rows=310 loops=1)

  • Buffers: shared hit=8516
37. 0.007 0.660 ↓ 13.2 53 1

Hash (cost=54.54..54.54 rows=4 width=165) (actual time=0.66..0.66 rows=53 loops=1)

  • Buffers: shared hit=177
38. 0.034 0.653 ↓ 13.2 53 1

Unique (cost=54.47..54.53 rows=4 width=161) (actual time=0.617..0.653 rows=53 loops=1)

  • Buffers: shared hit=177
39. 0.431 0.619 ↓ 13.2 53 1

Sort (cost=54.47..54.47 rows=4 width=161) (actual time=0.616..0.619 rows=53 loops=1)

  • Sort Key: adg.group_no, adg.group_name, adg.is_oneshot, adg.current_aresult_no, adg.start_date, adg.end_date, adg.reg_date, aga.group_no, aga.oneshot_info, aga.alink_no, agl.agent_group_no, ag_1.group_name, (CASE WHEN (gr.template_merge_type = gr.template_merge_bit) THEN 0 ELSE 1 END), atpl.template_name, atpl.ss_os_type_all, atpl.ss_web_type_all, atpl.ss_db_type_all, atpl.ss_network_type_all, atpl.ss_application_type_all, atpl.ss_cloud_type_all, atpl.ss_hypervisor_type_all, gr.atemplate_no, gr.template_class, gr.template_is_selected, gr.template_merge_type, gr.template_merge_bit
  • Sort Method: quicksort Memory: 39kB
  • Buffers: shared hit=177
40. 0.020 0.188 ↓ 13.2 53 1

Nested Loop (cost=0.39..54.46 rows=4 width=161) (actual time=0.041..0.188 rows=53 loops=1)

  • Buffers: shared hit=177
41. 0.009 0.113 ↓ 5.5 11 1

Nested Loop (cost=0.34..54.01 rows=2 width=140) (actual time=0.035..0.113 rows=11 loops=1)

  • Buffers: shared hit=111
42. 0.004 0.093 ↓ 5.5 11 1

Nested Loop (cost=0.31..53.93 rows=2 width=96) (actual time=0.031..0.093 rows=11 loops=1)

  • Buffers: shared hit=89
43. 0.001 0.071 ↓ 6.0 6 1

Nested Loop (cost=0.23..42.23 rows=1 width=78) (actual time=0.024..0.071 rows=6 loops=1)

  • Buffers: shared hit=62
44. 0.003 0.058 ↓ 6.0 6 1

Nested Loop (cost=0.2..42.18 rows=1 width=69) (actual time=0.022..0.058 rows=6 loops=1)

  • Buffers: shared hit=50
45. 0.000 0.037 ↓ 6.0 6 1

Nested Loop (cost=0.14..42.09 rows=1 width=61) (actual time=0.016..0.037 rows=6 loops=1)

  • Buffers: shared hit=31
46. 0.004 0.027 ↓ 5.0 5 1

Nested Loop (cost=0.09..40.36 rows=1 width=61) (actual time=0.012..0.027 rows=5 loops=1)

  • Buffers: shared hit=15
47. 0.001 0.008 ↑ 1.0 5 1

Unique (cost=0.03..0.03 rows=5 width=4) (actual time=0.005..0.008 rows=5 loops=1)

48. 0.006 0.007 ↑ 1.0 5 1

Sort (cost=0.03..0.03 rows=5 width=4) (actual time=0.005..0.007 rows=5 loops=1)

  • Sort Key: "*VALUES*_2".column1
  • Sort Method: quicksort Memory: 25kB
49. 0.001 0.001 ↑ 1.0 5 1

Values Scan (cost=0..0.02 rows=5 width=4) (actual time=0..0.001 rows=5 loops=1)

50. 0.015 0.015 ↑ 1.0 1 5

Index Scan using audit_group_parent_group_no_group_no_idx_c on audit_group adg (cost=0.06..8.06 rows=1 width=57) (actual time=0.003..0.003 rows=1 loops=5)

  • Index Cond: ((parent_group_no = 0) AND (group_no = "*VALUES*_2".column1))
  • Filter: ((is_pi = 0) AND (is_enable = 1))
  • Buffers: shared hit=15
51. 0.010 0.010 ↑ 2.0 1 5

Index Scan using audit_group_parent_group_no_group_no_idx_c on audit_group adgc (cost=0.06..1.72 rows=2 width=8) (actual time=0.001..0.002 rows=1 loops=5)

  • Index Cond: (parent_group_no = adg.group_no)
  • Filter: (is_enable = 1)
  • Buffers: shared hit=16
52. 0.018 0.018 ↑ 1.0 1 6

Index Only Scan using audit_group_link_audit_group_no_agent_group_no_idx_c on audit_group_link agl (cost=0.06..0.09 rows=1 width=8) (actual time=0.002..0.003 rows=1 loops=6)

  • Index Cond: (audit_group_no = adgc.group_no)
  • Heap Fetches: 6
  • Buffers: shared hit=19
53. 0.012 0.012 ↑ 1.0 1 6

Index Scan using agent_group_is_enable_group_no_idx_c on agent_group ag_1 (cost=0.03..0.04 rows=1 width=13) (actual time=0.002..0.002 rows=1 loops=6)

  • Index Cond: ((is_enable = 1) AND (group_no = agl.agent_group_no))
  • Buffers: shared hit=12
54. 0.018 0.018 ↑ 1.5 2 6

Index Scan using group_report_group_no_idx on group_report gr (cost=0.08..11.7 rows=3 width=18) (actual time=0.002..0.003 rows=2 loops=6)

  • Index Cond: (group_no = agl.audit_group_no)
  • Buffers: shared hit=27
55. 0.011 0.011 ↑ 1.0 1 11

Index Scan using adt_template_pkey on adt_template atpl (cost=0.03..0.04 rows=1 width=48) (actual time=0.001..0.001 rows=1 loops=11)

  • Index Cond: (atemplate_no = gr.atemplate_no)
  • Buffers: shared hit=22
56. 0.055 0.055 ↓ 5.0 5 11

Index Scan using auditgroup_access_group_no_alink_no_idx_c on auditgroup_access aga (cost=0.06..0.22 rows=1 width=36) (actual time=0.002..0.005 rows=5 loops=11)

  • Index Cond: (group_no = gr.group_no)
  • Filter: (gr.template_class = audit_class)
  • Buffers: shared hit=66
57. 0.014 0.125 ↑ 1.0 1 5

Nested Loop (cost=4.14..16.17 rows=1 width=1,061) (actual time=0.023..0.025 rows=1 loops=5)

  • Buffers: shared hit=84
58. 0.035 0.055 ↓ 3.0 3 5

Bitmap Heap Scan on audit_result ar (cost=4.08..8.09 rows=1 width=74) (actual time=0.009..0.011 rows=3 loops=5)

  • Filter: CASE WHEN (aresult_no >= adg.current_aresult_no) THEN true ELSE (audit_done = 1) END
  • Heap Blocks: exact=27
  • Buffers: shared hit=42
59. 0.020 0.020 ↓ 6.0 6 5

Bitmap Index Scan on audit_result_alink_no_atemplate_no_idx_c (cost=0..4.08 rows=1 width=0) (actual time=0.004..0.004 rows=6 loops=5)

  • Index Cond: ((csa.csa_alink_no = alink_no) AND (gr.atemplate_no = atemplate_no))
  • Buffers: shared hit=15
60. 0.056 0.056 ↓ 0.0 0 14

Index Scan using module_data_pkey on module_data md (cost=0.06..8.08 rows=1 width=991) (actual time=0.003..0.004 rows=0 loops=14)

  • Index Cond: (moddata_no = ar.moddata_no)
  • Filter: ((start_date > '2019-12-03 12:15:00+09'::timestamp with time zone) AND (asset_no = csa.csa_asset_no) AND (gather_type = 0) AND CASE WHEN (adg.is_oneshot = 0) THEN ((reg_date >= adg.start_date) AND (reg_date <= adg.end_date)) ELSE (ar.aresult_no = ANY (aga.oneshot_info)) END AND CASE WHEN (csa.ss_os_type > 0) THEN ((ss_os_type & csa.ss_os_type) = csa.ss_os_type) WHEN (csa.ss_db_type > 0) THEN ((ss_db_type & csa.ss_db_type) = csa.ss_db_type) WHEN (csa.ss_web_type > 0) THEN ((ss_web_type & csa.ss_web_type) = csa.ss_web_type) WHEN (csa.ss_network_type > 0) THEN ((ss_network_type & csa.ss_network_type) = csa.ss_network_type) WHEN (csa.ss_application_type > 0) THEN ((ss_application_type & csa.ss_application_type) = csa.ss_application_type) WHEN (csa.ss_cloud_type > 0) THEN ((ss_cloud_type & csa.ss_cloud_type) = csa.ss_cloud_type) WHEN (csa.ss_hypervisor_type > 0) THEN ((ss_hypervisor_type & csa.ss_hypervisor_type) = csa.ss_hypervisor_type) ELSE false END)
  • Buffers: shared hit=42
61. 0.005 0.085 ↓ 0.0 0 5

Limit (cost=16.27..16.27 rows=1 width=20) (actual time=0.017..0.017 rows=0 loops=5)

  • Buffers: shared hit=74
62. 0.010 0.080 ↓ 0.0 0 5

Sort (cost=16.27..16.27 rows=1 width=20) (actual time=0.016..0.016 rows=0 loops=5)

  • Sort Key: md_1.start_date, ar_1.start_date
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=74
63. 0.005 0.070 ↓ 2.0 2 5

Nested Loop (cost=0.14..16.27 rows=1 width=20) (actual time=0.006..0.014 rows=2 loops=5)

  • Buffers: shared hit=74
64. 0.035 0.035 ↓ 2.0 2 5

Index Scan using audit_result_alink_no_atemplate_no_idx_c on audit_result ar_1 (cost=0.08..8.21 rows=1 width=16) (actual time=0.005..0.007 rows=2 loops=5)

  • Index Cond: ((alink_no = adgd.ahr_alink_no) AND (atemplate_no = adgd.ahr_atemplate_no))
  • Filter: ((start_date IS NOT NULL) AND (audit_done = 1))
  • Buffers: shared hit=44
65. 0.030 0.030 ↑ 1.0 1 10

Index Scan using module_data_pkey on module_data md_1 (cost=0.06..8.06 rows=1 width=12) (actual time=0.002..0.003 rows=1 loops=10)

  • Index Cond: (moddata_no = ar_1.moddata_no)
  • Filter: ((start_date IS NOT NULL) AND (start_date > '2019-12-03 12:15:00+09'::timestamp with time zone))
  • Buffers: shared hit=30
66.          

CTE ati3

67. 0.099 0.111 ↓ 5.0 5 1

GroupAggregate (cost=0.01..0.03 rows=1 width=255) (actual time=0.045..0.111 rows=5 loops=1)

  • Group Key: att.audit_parent_group_no, att.merge_bit, att.csa_type_class, att.atemplate_no, att.template_name
  • Filter: (count(DISTINCT att.csa_asset_no) > 0)
68. 0.011 0.012 ↓ 5.0 5 1

Sort (cost=0.01..0.01 rows=1 width=255) (actual time=0.011..0.012 rows=5 loops=1)

  • Sort Key: att.audit_parent_group_no, att.merge_bit, att.csa_type_class, att.atemplate_no, att.template_name
  • Sort Method: quicksort Memory: 28kB
69. 0.001 0.001 ↓ 5.0 5 1

CTE Scan on att att (cost=0..0.01 rows=1 width=255) (actual time=0.001..0.001 rows=5 loops=1)

70.          

CTE ati2

71. 0.139 0.148 ↓ 4.0 4 1

GroupAggregate (cost=0.01..0.04 rows=1 width=249) (actual time=0.072..0.148 rows=4 loops=1)

  • Group Key: att_1.audit_parent_group_no, att_1.merge_bit
  • Filter: (count(DISTINCT att_1.csa_asset_no) > 0)
72. 0.004 0.009 ↓ 5.0 5 1

Sort (cost=0.01..0.01 rows=1 width=249) (actual time=0.009..0.009 rows=5 loops=1)

  • Sort Key: att_1.audit_parent_group_no, att_1.merge_bit
  • Sort Method: quicksort Memory: 28kB
73. 0.005 0.005 ↓ 5.0 5 1

CTE Scan on att att_1 (cost=0..0.01 rows=1 width=249) (actual time=0.001..0.005 rows=5 loops=1)

74.          

CTE ati1

75. 0.123 56.568 ↓ 4.0 4 1

GroupAggregate (cost=0.01..0.04 rows=1 width=255) (actual time=56.504..56.568 rows=4 loops=1)

  • Group Key: att_2.audit_parent_group_no, att_2.audit_reg_date, att_2.audit_name
  • Filter: (count(DISTINCT att_2.csa_asset_no) > 0)
  • Buffers: shared hit=8851
76. 0.008 56.445 ↓ 5.0 5 1

Sort (cost=0.01..0.01 rows=1 width=255) (actual time=56.444..56.445 rows=5 loops=1)

  • Sort Key: att_2.audit_parent_group_no, att_2.audit_reg_date, att_2.audit_name
  • Sort Method: quicksort Memory: 28kB
  • Buffers: shared hit=8851
77. 56.437 56.437 ↓ 5.0 5 1

CTE Scan on att att_2 (cost=0..0.01 rows=1 width=255) (actual time=56.38..56.437 rows=5 loops=1)

  • Buffers: shared hit=8851
78.          

CTE aati

79. 0.008 56.973 ↓ 4.0 4 1

WindowAgg (cost=0.04..0.05 rows=1 width=558) (actual time=56.968..56.973 rows=4 loops=1)

  • Buffers: shared hit=8851
80. 0.006 56.965 ↓ 4.0 4 1

Sort (cost=0.04..0.04 rows=1 width=558) (actual time=56.965..56.965 rows=4 loops=1)

  • Sort Key: ati1.audit_reg_date
  • Sort Method: quicksort Memory: 33kB
  • Buffers: shared hit=8851
81. 0.008 56.959 ↓ 4.0 4 1

WindowAgg (cost=0.04..0.04 rows=1 width=558) (actual time=56.954..56.959 rows=4 loops=1)

  • Buffers: shared hit=8851
82. 0.005 56.951 ↓ 4.0 4 1

Sort (cost=0.04..0.04 rows=1 width=558) (actual time=56.951..56.951 rows=4 loops=1)

  • Sort Key: ati1.audit_reg_date
  • Sort Method: quicksort Memory: 33kB
  • Buffers: shared hit=8851
83. 0.011 56.946 ↓ 4.0 4 1

Nested Loop (cost=0..0.03 rows=1 width=558) (actual time=56.744..56.946 rows=4 loops=1)

  • Buffers: shared hit=8851
84. 0.010 56.735 ↓ 4.0 4 1

Nested Loop (cost=0..0.02 rows=1 width=530) (actual time=56.583..56.735 rows=4 loops=1)

  • Buffers: shared hit=8851
85. 56.573 56.573 ↓ 4.0 4 1

CTE Scan on ati1 ati1 (cost=0..0.01 rows=1 width=292) (actual time=56.506..56.573 rows=4 loops=1)

  • Buffers: shared hit=8851
86. 0.152 0.152 ↓ 4.0 4 4

CTE Scan on ati2 ati2 (cost=0..0.01 rows=1 width=238) (actual time=0.018..0.038 rows=4 loops=4)

87. 0.072 0.200 ↑ 1.0 1 4

GroupAggregate (cost=0..0.01 rows=1 width=36) (actual time=0.05..0.05 rows=1 loops=4)

  • Group Key: ati2.audit_parent_group_no
88. 0.128 0.128 ↑ 1.0 1 4

CTE Scan on ati3 ati3 (cost=0..0.01 rows=1 width=36) (actual time=0.014..0.032 rows=1 loops=4)

  • Filter: (((ati2.merge_bit = merge_bit) OR (merge_bit IS NULL)) AND (ati2.audit_parent_group_no = audit_parent_group_no))
89. 0.011 57.035 ↓ 4.0 4 1

Nested Loop (cost=0.86..8.89 rows=1 width=636) (actual time=57.017..57.035 rows=4 loops=1)

  • Buffers: shared hit=8863
90. 0.003 57.008 ↓ 4.0 4 1

Nested Loop (cost=0.81..0.82 rows=1 width=606) (actual time=57.001..57.008 rows=4 loops=1)

  • Buffers: shared hit=8851
91. 56.977 56.977 ↓ 4.0 4 1

CTE Scan on aati aati (cost=0..0.01 rows=1 width=574) (actual time=56.973..56.977 rows=4 loops=1)

  • Filter: ((num >= 1) AND (num <= 30))
  • Buffers: shared hit=8851
92. 0.004 0.028 ↑ 1.0 1 4

Aggregate (cost=0.81..0.81 rows=1 width=4) (actual time=0.007..0.007 rows=1 loops=4)

93. 0.002 0.024 ↓ 0.0 0 4

Result (cost=0.21..0.66 rows=100 width=4) (actual time=0.005..0.006 rows=0 loops=4)

94. 0.004 0.022 ↑ 50.0 2 1

HashAggregate (cost=0.21..0.36 rows=100 width=32) (actual time=0.021..0.022 rows=2 loops=1)

  • Group Key: unnest(aati_1.filtered_alink_nos)
95. 0.018 0.018 ↑ 25.0 4 1

CTE Scan on aati aati_1 (cost=0..0.15 rows=100 width=32) (actual time=0.005..0.018 rows=4 loops=1)

96. 0.016 0.016 ↑ 1.0 1 4

Index Scan using audit_group_pkey on audit_group audit_group (cost=0.06..8.06 rows=1 width=34) (actual time=0.003..0.004 rows=1 loops=4)

  • Index Cond: (aati.audit_parent_group_no = group_no)
  • Buffers: shared hit=12
Planning time : 14.945 ms
Execution time : 57.712 ms