explain.depesz.com

A tool for finding a real cause for slow queries.

Result: Ajj

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 0.001 61.055 ↓ 11.0 11 1

Limit (cost=698.06..698.06 rows=1 width=57) (actual time=61.051..61.055 rows=11 loops=1)

2. 0.054 61.054 ↓ 11.0 11 1

Sort (cost=698.06..698.06 rows=1 width=57) (actual time=61.050..61.054 rows=11 loops=1)

  • Sort Key: pub_survey_jobs.survey_code, pub_survey_jobs.job_code, pub_survey_jobs.job_scope
  • Sort Method: quicksort Memory: 25kB
3. 0.013 61.000 ↓ 11.0 11 1

Nested Loop Left Join (cost=4.43..698.06 rows=1 width=57) (actual time=16.424..61.000 rows=11 loops=1)

4. 0.122 60.679 ↓ 11.0 11 1

Nested Loop (cost=4.43..692.32 rows=1 width=57) (actual time=16.390..60.679 rows=11 loops=1)

  • Join Filter: ((merit_default_cut_map.job_scope)::text = (pub_survey_jobs.job_scope)::text)
5. 0.020 58.621 ↓ 11.0 11 1

Nested Loop (cost=4.43..676.54 rows=1 width=81) (actual time=16.312..58.621 rows=11 loops=1)

  • Join Filter: ("substring"((merit_pwcenter_matches.org_job_code)::text, 1, 2) = (merit_pwcenter_functions.function_code)::text)
6. 0.698 58.579 ↓ 11.0 11 1

Nested Loop (cost=4.43..676.46 rows=1 width=92) (actual time=16.302..58.579 rows=11 loops=1)

  • Join Filter: ("substring"((merit_pwcenter_matches.org_job_code)::text, 3, 2) = (merit_pwcenter_subfunctions.subfunction_code)::text)
7. 4.135 56.223 ↓ 829.0 829 1

Nested Loop (cost=4.43..674.19 rows=1 width=88) (actual time=16.134..56.223 rows=829 loops=1)

  • Join Filter: ("substring"((merit_pwcenter_matches.org_job_code)::text, 5, 2) = (merit_pwcenter_career_levels.career_level_code)::text)
8. 2.427 27.047 ↓ 8,347.0 8,347 1

Nested Loop (cost=4.43..674.11 rows=1 width=88) (actual time=4.338..27.047 rows=8,347 loops=1)

9. 3.083 21.036 ↓ 28.0 28 1

Nested Loop (cost=0.00..24.96 rows=1 width=62) (actual time=3.235..21.036 rows=28 loops=1)

  • Join Filter: ((pub_survey_sources.pub_survey_code)::text = (merit_account_source_map.pub_survey_code)::text)
10. 1.069 8.471 ↓ 862.0 862 1

Nested Loop (cost=0.00..16.85 rows=1 width=58) (actual time=0.073..8.471 rows=862 loops=1)

11. 0.498 0.498 ↓ 863.0 863 1

Index Scan using data_cut_uniq on merit_default_cut_map (cost=0.00..8.77 rows=1 width=45) (actual time=0.038..0.498 rows=863 loops=1)

  • Index Cond: ((organization_id = 9624) AND (org_group_id = 9597))
12. 6.904 6.904 ↑ 1.0 1 863

Index Scan using pub_survey_sources_pub_survey_code_idx on pub_survey_sources (cost=0.00..8.07 rows=1 width=13) (actual time=0.008..0.008 rows=1 loops=863)

  • Index Cond: ((pub_survey_sources.pub_survey_code)::text = (merit_default_cut_map.survey_code)::text)
  • Filter: pub_survey_sources.active_p
13. 9.482 9.482 ↓ 19.0 19 862

Index Scan using merit_account_source_map_account_group_idx on merit_account_source_map (cost=0.00..8.10 rows=1 width=20) (actual time=0.004..0.011 rows=19 loops=862)

  • Index Cond: ((merit_account_source_map.account_id = 9624) AND (merit_account_source_map.org_group_id = 9597))
  • Filter: (merit_account_source_map.archive_p = 0)
14. 2.324 3.584 ↓ 1.3 298 28

Bitmap Heap Scan on merit_pwcenter_matches (cost=4.43..646.82 rows=223 width=26) (actual time=0.049..0.128 rows=298 loops=28)

  • Recheck Cond: ((merit_pwcenter_matches.survey_code)::text = (merit_account_source_map.pub_survey_code)::text)
15. 1.260 1.260 ↓ 1.3 298 28

Bitmap Index Scan on merit_pwcenter_matches_sc_idx (cost=0.00..4.42 rows=223 width=0) (actual time=0.045..0.045 rows=298 loops=28)

  • Index Cond: ((merit_pwcenter_matches.survey_code)::text = (merit_account_source_map.pub_survey_code)::text)
16. 25.041 25.041 ↑ 1.0 1 8,347

Index Scan using merit_pwcenter_career_levels_pk on merit_pwcenter_career_levels (cost=0.00..0.06 rows=1 width=3) (actual time=0.002..0.003 rows=1 loops=8,347)

  • Index Cond: (merit_pwcenter_career_levels.career_level_pk = 13)
17. 1.658 1.658 ↑ 1.0 1 829

Index Scan using merit_pwcenter_subfunctions_pk on merit_pwcenter_subfunctions (cost=0.00..2.26 rows=1 width=7) (actual time=0.002..0.002 rows=1 loops=829)

  • Index Cond: (merit_pwcenter_subfunctions.subfunction_pk = 685)
  • Filter: (merit_pwcenter_subfunctions.function_pk = 11)
18. 0.022 0.022 ↑ 1.0 1 11

Index Scan using merit_pwcenter_functions_pk on merit_pwcenter_functions (cost=0.00..0.06 rows=1 width=7) (actual time=0.002..0.002 rows=1 loops=11)

  • Index Cond: (merit_pwcenter_functions.function_pk = 11)
19. 1.936 1.936 ↓ 69.0 69 11

Index Scan using pub_survey_jobs_sc_jc_idx on pub_survey_jobs (cost=0.00..15.78 rows=1 width=57) (actual time=0.041..0.176 rows=69 loops=11)

  • Index Cond: (((pub_survey_jobs.survey_code)::text = (merit_account_source_map.pub_survey_code)::text) AND ((pub_survey_jobs.job_code)::text = (merit_pwcenter_matches.survey_job_code)::text))
  • Filter: ((pub_survey_jobs.currency)::text = 'USD'::text)
20. 0.308 0.308 ↑ 1.0 1 11

Index Scan using pub_survey_jobs_desc_sc_jc_idx on pub_survey_jobs_desc (cost=0.00..5.72 rows=1 width=23) (actual time=0.028..0.028 rows=1 loops=11)

  • Index Cond: (((pub_survey_jobs_desc.survey_code)::text = (pub_survey_jobs.survey_code)::text) AND ((pub_survey_jobs_desc.job_code)::text = (pub_survey_jobs.job_code)::text))