explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3nAI

Settings
# exclusive inclusive rows x rows loops node
1. 0.167 263.862 ↑ 1.0 24 1

Limit (cost=14,179.93..15,880.66 rows=24 width=2,782) (actual time=236.548..263.862 rows=24 loops=1)

2. 2.840 263.695 ↑ 2.8 216 1

Nested Loop Left Join (cost=574.11..42,950.58 rows=598 width=2,782) (actual time=6.664..263.695 rows=216 loops=1)

3. 0.596 260.207 ↑ 2.8 216 1

Nested Loop Left Join (cost=573.83..42,570.97 rows=598 width=2,788) (actual time=6.597..260.207 rows=216 loops=1)

4. 0.490 256.803 ↑ 2.8 216 1

Nested Loop Left Join (cost=573.83..41,373.48 rows=598 width=2,780) (actual time=6.578..256.803 rows=216 loops=1)

5. 9.375 250.697 ↑ 2.8 216 1

Nested Loop Left Join (cost=573.55..28,907.65 rows=598 width=2,772) (actual time=6.563..250.697 rows=216 loops=1)

  • Join Filter: (offer.id = offer_approval.offer_id)
  • Rows Removed by Join Filter: 17496
6. 0.774 231.386 ↑ 2.8 216 1

Nested Loop Left Join (cost=420.91..28,016.32 rows=598 width=2,747) (actual time=4.865..231.386 rows=216 loops=1)

7. 54.708 229.964 ↑ 2.8 216 1

Nested Loop Left Join (cost=420.63..27,802.25 rows=598 width=2,734) (actual time=4.855..229.964 rows=216 loops=1)

  • Join Filter: (pc.candidate_id = cpv.candidate_id)
  • Rows Removed by Join Filter: 105135
8. 0.493 122.984 ↑ 2.8 216 1

Nested Loop Left Join (cost=6.32..25,965.02 rows=598 width=2,693) (actual time=1.018..122.984 rows=216 loops=1)

9. 43.154 122.059 ↑ 2.8 216 1

Nested Loop Left Join (cost=6.17..25,859.11 rows=598 width=2,241) (actual time=1.014..122.059 rows=216 loops=1)

  • Join Filter: ((interview.id = ih.interview_id) AND (ih.interview_no = interview.interview_no))
  • Rows Removed by Join Filter: 81844
10. 0.495 40.241 ↑ 2.8 216 1

Nested Loop Left Join (cost=6.17..21,651.63 rows=598 width=2,233) (actual time=0.218..40.241 rows=216 loops=1)

11. 0.589 39.530 ↑ 2.8 216 1

Nested Loop Left Join (cost=6.03..21,540.77 rows=598 width=2,225) (actual time=0.214..39.530 rows=216 loops=1)

12. 0.514 38.081 ↑ 2.8 215 1

Nested Loop Left Join (cost=5.48..21,117.58 rows=598 width=2,180) (actual time=0.208..38.081 rows=215 loops=1)

13. 0.369 37.137 ↑ 2.8 215 1

Nested Loop Left Join (cost=5.21..20,917.59 rows=598 width=2,148) (actual time=0.201..37.137 rows=215 loops=1)

14. 0.375 36.553 ↑ 2.8 215 1

Nested Loop Left Join (cost=5.06..20,800.88 rows=598 width=2,136) (actual time=0.198..36.553 rows=215 loops=1)

15. 0.352 35.963 ↑ 2.8 215 1

Nested Loop Left Join (cost=4.78..20,361.20 rows=598 width=2,084) (actual time=0.195..35.963 rows=215 loops=1)

16. 0.421 35.396 ↑ 2.8 215 1

Nested Loop Left Join (cost=4.51..20,115.98 rows=598 width=2,070) (actual time=0.192..35.396 rows=215 loops=1)

17. 0.379 34.760 ↑ 2.8 215 1

Nested Loop Left Join (cost=4.23..19,924.13 rows=598 width=2,053) (actual time=0.190..34.760 rows=215 loops=1)

18. 2.280 34.166 ↑ 2.8 215 1

Nested Loop Left Join (cost=3.94..15,953.06 rows=598 width=2,030) (actual time=0.186..34.166 rows=215 loops=1)

  • Join Filter: (vertical.id = pd.vertical_id)
  • Rows Removed by Join Filter: 3440
19. 0.504 30.166 ↑ 2.8 215 1

Nested Loop Left Join (cost=3.94..15,772.41 rows=598 width=1,612) (actual time=0.141..30.166 rows=215 loops=1)

20. 0.497 29.017 ↑ 2.8 215 1

Nested Loop Left Join (cost=3.80..15,669.84 rows=598 width=1,602) (actual time=0.136..29.017 rows=215 loops=1)

21. 0.592 28.305 ↑ 2.8 215 1

Nested Loop Left Join (cost=3.52..15,455.76 rows=598 width=1,589) (actual time=0.130..28.305 rows=215 loops=1)

22. 0.655 27.068 ↑ 2.8 215 1

Nested Loop Left Join (cost=3.25..15,244.11 rows=598 width=1,572) (actual time=0.126..27.068 rows=215 loops=1)

23. 0.522 25.983 ↑ 2.8 215 1

Nested Loop Left Join (cost=2.97..15,039.02 rows=598 width=1,464) (actual time=0.116..25.983 rows=215 loops=1)

24. 0.668 24.816 ↑ 2.8 215 1

Nested Loop Left Join (cost=2.82..14,935.47 rows=598 width=1,456) (actual time=0.113..24.816 rows=215 loops=1)

25. 0.570 23.503 ↑ 2.8 215 1

Nested Loop Left Join (cost=2.54..14,637.36 rows=598 width=1,429) (actual time=0.110..23.503 rows=215 loops=1)

26. 0.570 22.073 ↑ 2.8 215 1

Nested Loop Left Join (cost=2.26..14,440.55 rows=598 width=1,388) (actual time=0.102..22.073 rows=215 loops=1)

27. 0.484 20.643 ↑ 2.8 215 1

Nested Loop Left Join (cost=1.97..10,273.29 rows=598 width=1,357) (actual time=0.095..20.643 rows=215 loops=1)

28. 1.003 19.299 ↑ 2.8 215 1

Nested Loop (cost=1.69..6,807.36 rows=598 width=1,342) (actual time=0.088..19.299 rows=215 loops=1)

29. 0.601 17.436 ↑ 2.8 215 1

Nested Loop (cost=1.40..6,303.25 rows=598 width=1,166) (actual time=0.080..17.436 rows=215 loops=1)

30. 0.449 15.975 ↑ 2.8 215 1

Nested Loop Left Join (cost=1.12..6,032.82 rows=598 width=402) (actual time=0.072..15.975 rows=215 loops=1)

31. 0.513 15.311 ↑ 2.8 215 1

Nested Loop Left Join (cost=0.84..5,821.17 rows=598 width=385) (actual time=0.068..15.311 rows=215 loops=1)

32. 2.465 14.583 ↑ 2.8 215 1

Nested Loop (cost=0.56..5,609.51 rows=598 width=368) (actual time=0.061..14.583 rows=215 loops=1)

33. 3.322 3.322 ↑ 3.8 2,932 1

Index Scan using position_candidate_sent_date__idx on position_candidate pc (cost=0.29..1,672.91 rows=11,280 width=293) (actual time=0.018..3.322 rows=2,932 loops=1)

  • Filter: (status >= 102)
34. 8.796 8.796 ↓ 0.0 0 2,932

Index Scan using position_description_pkey on position_description pd (cost=0.28..0.34 rows=1 width=83) (actual time=0.003..0.003 rows=0 loops=2,932)

  • Index Cond: (id = pc.position_description_id)
  • Filter: (floated_job = 1)
  • Rows Removed by Filter: 1
35. 0.215 0.215 ↓ 0.0 0 215

Index Scan using client_account_pkey on user_account shortlisted_user_account (cost=0.28..0.34 rows=1 width=21) (actual time=0.001..0.001 rows=0 loops=215)

  • Index Cond: (id = pc.shortlisted_user_id)
36. 0.215 0.215 ↓ 0.0 0 215

Index Scan using client_account_pkey on user_account sent_user_account (cost=0.28..0.34 rows=1 width=21) (actual time=0.001..0.001 rows=0 loops=215)

  • Index Cond: (id = pc.sent_user_id)
37. 0.860 0.860 ↑ 1.0 1 215

Index Scan using candidate_extension_candidate_id__pkey on candidate_extension ce (cost=0.29..0.44 rows=1 width=764) (actual time=0.003..0.004 rows=1 loops=215)

  • Index Cond: (candidate_id = pc.candidate_id)
38. 0.860 0.860 ↑ 1.0 1 215

Index Scan using candidate_pkey on candidate c (cost=0.29..0.83 rows=1 width=184) (actual time=0.003..0.004 rows=1 loops=215)

  • Index Cond: (id = pc.candidate_id)
39. 0.860 0.860 ↑ 1.0 1 215

Index Scan using contact__pkey on contact (cost=0.28..5.79 rows=1 width=19) (actual time=0.003..0.004 rows=1 loops=215)

  • Index Cond: (id = pd.contact_id)
40. 0.860 0.860 ↑ 1.0 1 215

Index Scan using company__pkey on company (cost=0.29..6.96 rows=1 width=35) (actual time=0.003..0.004 rows=1 loops=215)

  • Index Cond: (id = pd.company_id)
41. 0.860 0.860 ↑ 1.0 1 215

Index Scan using position_extension__pkey on position_extension pe (cost=0.28..0.32 rows=1 width=49) (actual time=0.003..0.004 rows=1 loops=215)

  • Index Cond: (pc.position_description_id = position_id)
42. 0.645 0.645 ↑ 1.0 1 215

Index Scan using common_location_pkey on common_location cl (cost=0.29..0.49 rows=1 width=39) (actual time=0.003..0.003 rows=1 loops=215)

  • Index Cond: (c.current_location_id = id)
43. 0.645 0.645 ↓ 0.0 0 215

Index Scan using country_pkey on country co (cost=0.14..0.16 rows=1 width=13) (actual time=0.003..0.003 rows=0 loops=215)

  • Index Cond: ((cl.country_code)::text = (code)::text)
44. 0.430 0.430 ↓ 0.0 0 215

Index Scan using offer_valid_position_candidate_id__unq on offer (cost=0.28..0.33 rows=1 width=112) (actual time=0.002..0.002 rows=0 loops=215)

  • Index Cond: ((pc.id = position_candidate_id) AND (valid = 1))
45. 0.645 0.645 ↑ 1.0 1 215

Index Scan using client_account_pkey on user_account ua (cost=0.28..0.34 rows=1 width=21) (actual time=0.002..0.003 rows=1 loops=215)

  • Index Cond: (id = pc.created_by)
46. 0.215 0.215 ↓ 0.0 0 215

Index Scan using client_account_pkey on user_account ua_deleted_by (cost=0.28..0.35 rows=1 width=21) (actual time=0.001..0.001 rows=0 loops=215)

  • Index Cond: (id = c.deleted_by_user_id)
47. 0.645 0.645 ↑ 1.0 1 215

Index Scan using candidate_source_pkey on candidate_source (cost=0.14..0.16 rows=1 width=18) (actual time=0.002..0.003 rows=1 loops=215)

  • Index Cond: (id = c.candidate_source_id)
48. 1.711 1.720 ↑ 1.2 16 215

Materialize (cost=0.00..1.30 rows=20 width=422) (actual time=0.001..0.008 rows=16 loops=215)

49. 0.009 0.009 ↑ 1.2 16 1

Seq Scan on vertical (cost=0.00..1.20 rows=20 width=422) (actual time=0.003..0.009 rows=16 loops=1)

50. 0.215 0.215 ↓ 0.0 0 215

Index Scan using company_location__pkey on company_location (cost=0.29..6.63 rows=1 width=27) (actual time=0.001..0.001 rows=0 loops=215)

  • Index Cond: (id = pd.company_location_id)
51. 0.215 0.215 ↓ 0.0 0 215

Index Scan using client_account_pkey on user_account (cost=0.28..0.31 rows=1 width=21) (actual time=0.001..0.001 rows=0 loops=215)

  • Index Cond: (company.company_owner_id = id)
52. 0.215 0.215 ↓ 0.0 0 215

Index Scan using invoice_offer_id__unq on invoice (cost=0.28..0.40 rows=1 width=18) (actual time=0.001..0.001 rows=0 loops=215)

  • Index Cond: (offer_id = offer.id)
53. 0.215 0.215 ↓ 0.0 0 215

Index Scan using offer_personal_info__offer__fkey on offer_personal_info (cost=0.28..0.73 rows=1 width=56) (actual time=0.001..0.001 rows=0 loops=215)

  • Index Cond: (offer_id = offer.id)
54. 0.215 0.215 ↓ 0.0 0 215

Index Scan using offer_fee_model__offer_id__fkey on offer_fee_model (cost=0.15..0.19 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=215)

  • Index Cond: (offer_id = offer.id)
55. 0.430 0.430 ↓ 0.0 0 215

Index Scan using compensation_position_id__uidx on compensation (cost=0.28..0.32 rows=1 width=36) (actual time=0.002..0.002 rows=0 loops=215)

  • Index Cond: (pc.position_description_id = position_id)
56. 0.280 0.860 ↓ 0.0 0 215

Nested Loop Left Join (cost=0.55..0.70 rows=1 width=49) (actual time=0.004..0.004 rows=0 loops=215)

57. 0.430 0.430 ↓ 0.0 0 215

Index Scan using interview_position_candidate_id on interview (cost=0.27..0.30 rows=1 width=40) (actual time=0.002..0.002 rows=0 loops=215)

  • Index Cond: (position_candidate_id = pc.id)
  • Filter: ((pc.status - interview_no) = 103)
58. 0.150 0.150 ↑ 1.0 1 30

Index Scan using interview_time__interview_id_fkey on interview_time (cost=0.27..0.39 rows=1 width=20) (actual time=0.004..0.005 rows=1 loops=30)

  • Index Cond: (interview.id = interview_id)
  • Filter: ((selected = 1) OR (index_num = 1))
  • Rows Removed by Filter: 0
59. 0.216 0.216 ↓ 0.0 0 216

Index Scan using compensation_fee_model_compensation_id__fkey on compensation_fee_model (cost=0.14..0.18 rows=1 width=12) (actual time=0.001..0.001 rows=0 loops=216)

  • Index Cond: (compensation_id = compensation.id)
60. 38.448 38.664 ↑ 1.1 379 216

Materialize (cost=0.00..12.02 rows=401 width=24) (actual time=0.001..0.179 rows=379 loops=216)

61. 0.216 0.216 ↑ 1.1 379 1

Seq Scan on interview_history ih (cost=0.00..10.01 rows=401 width=24) (actual time=0.004..0.216 rows=379 loops=1)

62. 0.432 0.432 ↓ 0.0 0 216

Index Scan using company_response__position_candidate_id__fkey on position_candidate_company_response (cost=0.14..0.17 rows=1 width=456) (actual time=0.002..0.002 rows=0 loops=216)

  • Index Cond: (position_candidate_id = pc.id)
63. 49.242 52.272 ↓ 3.1 487 216

Materialize (cost=414.31..420.37 rows=158 width=45) (actual time=0.008..0.242 rows=487 loops=216)

64. 0.456 3.030 ↓ 3.1 487 1

Subquery Scan on cpv (cost=414.31..419.58 rows=158 width=45) (actual time=1.612..3.030 rows=487 loops=1)

65. 0.626 2.574 ↓ 3.1 487 1

Unique (cost=414.31..418.00 rows=158 width=53) (actual time=1.610..2.574 rows=487 loops=1)

66. 0.990 1.948 ↓ 1.0 738 1

Sort (cost=414.31..416.15 rows=737 width=53) (actual time=1.610..1.948 rows=738 loops=1)

  • Sort Key: cd.candidate_id, cd.created DESC
  • Sort Method: quicksort Memory: 128kB
67. 0.847 0.958 ↓ 1.0 738 1

Bitmap Heap Scan on candidate_document cd (cost=22.00..379.21 rows=737 width=53) (actual time=0.142..0.958 rows=738 loops=1)

  • Recheck Cond: ((document_type)::text = 'candidate_photo'::text)
  • Heap Blocks: exact=229
68. 0.111 0.111 ↓ 1.1 790 1

Bitmap Index Scan on candidate_document_document_type_idx (cost=0.00..21.81 rows=737 width=0) (actual time=0.111..0.111 rows=790 loops=1)

  • Index Cond: ((document_type)::text = 'candidate_photo'::text)
69. 0.648 0.648 ↑ 1.0 1 216

Index Scan using client_account_pkey on user_account user_temp (cost=0.28..0.35 rows=1 width=21) (actual time=0.003..0.003 rows=1 loops=216)

  • Index Cond: (c.user_account_id = id)
70. 8.370 9.936 ↑ 1.0 81 216

Materialize (cost=152.64..155.99 rows=82 width=29) (actual time=0.007..0.046 rows=81 loops=216)

71. 0.093 1.566 ↑ 1.0 81 1

Hash Left Join (cost=152.64..155.58 rows=82 width=29) (actual time=1.443..1.566 rows=81 loops=1)

  • Hash Cond: (offer_approval.user_account_id = approver.id)
72. 0.052 0.052 ↑ 1.0 81 1

Seq Scan on offer_approval (cost=0.00..1.82 rows=82 width=12) (actual time=0.006..0.052 rows=81 loops=1)

73. 0.688 1.421 ↑ 1.0 1,095 1

Hash (cost=138.95..138.95 rows=1,095 width=21) (actual time=1.421..1.421 rows=1,095 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 75kB
74. 0.733 0.733 ↑ 1.0 1,095 1

Seq Scan on user_account approver (cost=0.00..138.95 rows=1,095 width=21) (actual time=0.002..0.733 rows=1,095 loops=1)

75. 0.432 5.616 ↓ 0.0 0 216

GroupAggregate (cost=0.29..20.83 rows=1 width=8) (actual time=0.026..0.026 rows=0 loops=216)

  • Group Key: cd_1.candidate_id
76. 0.216 5.184 ↓ 0.0 0 216

Result (cost=0.29..20.81 rows=1 width=8) (actual time=0.024..0.024 rows=0 loops=216)

  • One-Time Filter: (pc.status >= 102)
77. 1.136 4.968 ↓ 0.0 0 216

Nested Loop (cost=0.29..20.81 rows=1 width=8) (actual time=0.023..0.023 rows=0 loops=216)

  • Join Filter: (cd_1.document_types_id = odt.document_type_id)
78. 1.296 1.296 ↑ 1.7 3 216

Index Scan using candidate_document_candidate_id_idx on candidate_document cd_1 (cost=0.29..18.69 rows=5 width=8) (actual time=0.003..0.006 rows=3 loops=216)

  • Index Cond: (pc.candidate_id = candidate_id)
79. 0.460 2.536 ↓ 0.0 0 634

Materialize (cost=0.00..1.97 rows=2 width=4) (actual time=0.004..0.004 rows=0 loops=634)

80. 2.076 2.076 ↓ 0.0 0 173

Seq Scan on onboarding_document_type odt (cost=0.00..1.96 rows=2 width=4) (actual time=0.012..0.012 rows=0 loops=173)

  • Filter: (pc.position_description_id = job_id)
  • Rows Removed by Filter: 110
81. 0.432 2.808 ↓ 0.0 0 216

GroupAggregate (cost=0.00..1.98 rows=1 width=8) (actual time=0.013..0.013 rows=0 loops=216)

  • Group Key: onboarding_document_type.job_id
82. 2.376 2.376 ↓ 0.0 0 216

Seq Scan on onboarding_document_type (cost=0.00..1.96 rows=2 width=8) (actual time=0.011..0.011 rows=0 loops=216)

  • Filter: (job_id = pc.position_description_id)
  • Rows Removed by Filter: 110
83. 0.648 0.648 ↓ 0.0 0 216

Index Scan using gdpr_compliance_pkey on candidate_gdpr_compliance cgc (cost=0.28..0.30 rows=1 width=6) (actual time=0.003..0.003 rows=0 loops=216)

  • Index Cond: (c.id = candidate_id)