explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vlpb

Settings
# exclusive inclusive rows x rows loops node
1. 0.020 11,025.021 ↑ 1.0 25 1

Limit (cost=14,903.06..127,265.88 rows=25 width=1,706) (actual time=514.724..11,025.021 rows=25 loops=1)

2. 0.248 11,025.001 ↑ 1,042,924.5 25 1

Nested Loop Left Join (cost=14,903.06..117,185,946,185.16 rows=26,073,112 width=1,706) (actual time=514.723..11,025.001 rows=25 loops=1)

3. 0.099 11,024.078 ↑ 521,462.2 25 1

Nested Loop Left Join (cost=14,902.35..117,069,775,310.16 rows=13,036,556 width=1,667) (actual time=514.667..11,024.078 rows=25 loops=1)

4. 0.090 3,340.904 ↑ 260,731.1 25 1

Nested Loop Left Join (cost=117.00..20,685,986,598.95 rows=6,518,278 width=1,635) (actual time=180.240..3,340.904 rows=25 loops=1)

5. 0.100 3,340.589 ↑ 260,731.1 25 1

Nested Loop Left Join (cost=116.57..20,675,704,015.40 rows=6,518,278 width=1,627) (actual time=180.203..3,340.589 rows=25 loops=1)

6. 0.099 3,337.639 ↑ 130,365.6 25 1

Nested Loop Left Join (cost=112.79..20,649,475,733.11 rows=3,259,139 width=1,595) (actual time=180.058..3,337.639 rows=25 loops=1)

7. 0.074 3,325.515 ↑ 130,365.6 25 1

Nested Loop Left Join (cost=112.36..20,647,727,699.23 rows=3,259,139 width=1,577) (actual time=180.050..3,325.515 rows=25 loops=1)

8. 0.117 3,325.241 ↑ 130,365.6 25 1

Nested Loop Left Join (cost=111.81..20,620,409,137.16 rows=3,259,139 width=1,561) (actual time=180.025..3,325.241 rows=25 loops=1)

9. 0.384 3,324.549 ↑ 130,365.6 25 1

Nested Loop Left Join (cost=103.29..20,592,536,387.87 rows=3,259,139 width=1,529) (actual time=179.983..3,324.549 rows=25 loops=1)

  • Join Filter: (ua.id = co.company_owner_id)
  • Rows Removed by Join Filter: 2400
10. 0.089 3,323.715 ↑ 130,365.6 25 1

Nested Loop Left Join (cost=103.29..20,583,394,481.84 rows=3,259,139 width=1,511) (actual time=179.744..3,323.715 rows=25 loops=1)

11. 0.082 4.251 ↑ 130,365.6 25 1

Nested Loop Left Join (cost=102.86..3,553,071.31 rows=3,259,139 width=1,463) (actual time=1.640..4.251 rows=25 loops=1)

12. 0.965 3.819 ↑ 22,477.2 25 1

Nested Loop Left Join (cost=102.43..3,267,522.57 rows=561,929 width=1,394) (actual time=1.619..3.819 rows=25 loops=1)

  • Join Filter: (c.id = pc.contact_id)
  • Rows Removed by Join Filter: 7325
13. 0.120 1.029 ↑ 22,477.2 25 1

Nested Loop (cost=0.84..325,720.01 rows=561,929 width=1,386) (actual time=0.341..1.029 rows=25 loops=1)

14. 0.509 0.509 ↑ 22,482.4 25 1

Index Scan using contact_insert_timestamp_desc__idx on contact c (cost=0.42..66,147.43 rows=562,059 width=1,347) (actual time=0.320..0.509 rows=25 loops=1)

  • Filter: ((deleted_timestamp IS NULL) AND ((board >= 1) OR (board IS NULL)))
  • Rows Removed by Filter: 188
15. 0.400 0.400 ↑ 1.0 1 25

Index Scan using company__pkey on company co (cost=0.42..0.46 rows=1 width=43) (actual time=0.016..0.016 rows=1 loops=25)

  • Index Cond: (id = c.company_id)
  • Filter: (deleted_timestamp IS NULL)
16. 0.655 1.825 ↑ 1.2 293 25

Materialize (cost=101.59..110.31 rows=349 width=12) (actual time=0.043..0.073 rows=293 loops=25)

17. 0.055 1.170 ↑ 1.2 293 1

Subquery Scan on pc (cost=101.59..108.57 rows=349 width=12) (actual time=1.051..1.170 rows=293 loops=1)

18. 0.219 1.115 ↑ 1.2 293 1

HashAggregate (cost=101.59..105.08 rows=349 width=12) (actual time=1.050..1.115 rows=293 loops=1)

  • Group Key: position_description.contact_id
19. 0.896 0.896 ↑ 1.0 420 1

Seq Scan on position_description (cost=0.00..99.49 rows=420 width=4) (actual time=0.018..0.896 rows=420 loops=1)

  • Filter: ((floated_job = 0) AND (position_category = 1))
  • Rows Removed by Filter: 146
20. 0.350 0.350 ↑ 1.0 1 25

Index Scan using contact_extension_pkey on contact_extension ce (cost=0.43..0.51 rows=1 width=73) (actual time=0.014..0.014 rows=1 loops=25)

  • Index Cond: (c.id = contact_id)
21. 0.225 3,319.375 ↓ 0.0 0 25

GroupAggregate (cost=0.42..6,314.48 rows=1 width=52) (actual time=132.774..132.775 rows=0 loops=25)

  • Group Key: col.contact_id
22. 0.172 3,319.150 ↓ 0.0 0 25

Nested Loop (cost=0.42..6,314.45 rows=1 width=57) (actual time=111.842..132.766 rows=0 loops=25)

23. 3,318.725 3,318.725 ↓ 0.0 0 25

Seq Scan on contact_location col (cost=0.00..6,311.81 rows=1 width=8) (actual time=111.825..132.749 rows=0 loops=25)

  • Filter: (contact_id = c.id)
  • Rows Removed by Filter: 334449
24. 0.253 0.253 ↑ 1.0 1 11

Index Scan using company_location__pkey on company_location cl (cost=0.42..2.64 rows=1 width=57) (actual time=0.023..0.023 rows=1 loops=11)

  • Index Cond: (id = col.company_location_id)
25. 0.264 0.450 ↑ 1.9 96 25

Materialize (cost=0.00..21.60 rows=187 width=22) (actual time=0.001..0.018 rows=96 loops=25)

26. 0.186 0.186 ↑ 1.9 96 1

Seq Scan on user_account ua (cost=0.00..20.66 rows=187 width=22) (actual time=0.010..0.186 rows=96 loops=1)

  • Filter: ((deleted_timestamp IS NULL) AND (system_admin = 0))
  • Rows Removed by Filter: 54
27. 0.300 0.575 ↑ 1.0 1 25

Aggregate (cost=8.52..8.53 rows=1 width=32) (actual time=0.023..0.023 rows=1 loops=25)

28. 0.275 0.275 ↑ 10.0 1 25

Index Scan using client_account_pkey on user_account ua_1 (cost=0.15..8.49 rows=10 width=18) (actual time=0.009..0.011 rows=1 loops=25)

  • Index Cond: (id = ANY (c.contact_owner_ids))
29. 0.025 0.200 ↓ 0.0 0 25

GroupAggregate (cost=0.56..8.36 rows=1 width=20) (actual time=0.008..0.008 rows=0 loops=25)

  • Group Key: pd.contact_id
30. 0.050 0.175 ↓ 0.0 0 25

Nested Loop (cost=0.56..8.29 rows=5 width=10) (actual time=0.007..0.007 rows=0 loops=25)

31. 0.125 0.125 ↓ 0.0 0 25

Index Scan using position_description__contact_id__fkey on position_description pd (cost=0.28..2.50 rows=1 width=14) (actual time=0.005..0.005 rows=0 loops=25)

  • Index Cond: (contact_id = c.id)
  • Filter: (position_category = 1)
32. 0.000 0.000 ↓ 0.0 0

Index Scan using index_pc_pd on position_candidate pc_1 (cost=0.28..5.74 rows=5 width=8) (never executed)

  • Index Cond: (position_description_id = pd.id)
33. 12.025 12.025 ↓ 0.0 0 25

Index Scan using contact__pkey on contact (cost=0.42..0.54 rows=1 width=26) (actual time=0.481..0.481 rows=0 loops=25)

  • Index Cond: (id = c.report_to)
  • Filter: (deleted_timestamp IS NULL)
34. 0.350 2.850 ↑ 2.0 1 25

GroupAggregate (cost=3.78..8.01 rows=2 width=36) (actual time=0.114..0.114 rows=1 loops=25)

  • Group Key: ci.contact_id
35. 0.975 2.500 ↓ 1.5 3 25

Hash Join (cost=3.78..7.97 rows=2 width=19) (actual time=0.070..0.100 rows=3 loops=25)

  • Hash Cond: (v.id = ci.industry_id)
36. 0.625 0.625 ↑ 1.0 172 25

Seq Scan on vertical v (cost=0.00..3.72 rows=172 width=19) (actual time=0.007..0.025 rows=172 loops=25)

37. 0.075 0.900 ↓ 1.5 3 25

Hash (cost=3.76..3.76 rows=2 width=8) (actual time=0.036..0.036 rows=3 loops=25)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
38. 0.825 0.825 ↓ 1.5 3 25

Index Scan using contact_industry_contact_id_idx on contact_industry ci (cost=0.42..3.76 rows=2 width=8) (actual time=0.025..0.033 rows=3 loops=25)

  • Index Cond: (contact_id = c.id)
39. 0.050 0.225 ↓ 0.0 0 25

GroupAggregate (cost=0.42..1.56 rows=1 width=12) (actual time=0.009..0.009 rows=0 loops=25)

  • Group Key: candidate.contact_id
40. 0.175 0.175 ↓ 0.0 0 25

Index Only Scan using candidate__contact_id__fkey on candidate (cost=0.42..1.54 rows=1 width=4) (actual time=0.007..0.007 rows=0 loops=25)

  • Index Cond: (contact_id = c.id)
  • Heap Fetches: 0
41. 0.250 7,683.075 ↑ 2.0 1 25

GroupAggregate (cost=14,785.35..14,786.65 rows=2 width=36) (actual time=307.323..307.323 rows=1 loops=25)

  • Group Key: contact_functional_expertise.contact_id
42. 0.275 7,682.825 ↑ 2.0 1 25

Hash Join (cost=14,785.35..14,786.62 rows=2 width=520) (actual time=307.312..307.313 rows=1 loops=25)

  • Hash Cond: (fex.id = contact_functional_expertise.functional_expertise_id)
43. 0.150 0.150 ↑ 1.8 10 25

Seq Scan on functional_expertise fex (cost=0.00..1.18 rows=18 width=520) (actual time=0.005..0.006 rows=10 loops=25)

44. 0.075 7,682.400 ↑ 2.0 1 25

Hash (cost=14,785.33..14,785.33 rows=2 width=8) (actual time=307.296..307.296 rows=1 loops=25)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
45. 0.100 7,682.325 ↑ 2.0 1 25

Unique (cost=14,785.30..14,785.31 rows=2 width=8) (actual time=307.292..307.293 rows=1 loops=25)

46. 0.325 7,682.225 ↑ 2.0 1 25

Sort (cost=14,785.30..14,785.30 rows=2 width=8) (actual time=307.289..307.289 rows=1 loops=25)

  • Sort Key: contact_functional_expertise.functional_expertise_id
  • Sort Method: quicksort Memory: 25kB
47. 7,681.900 7,681.900 ↑ 2.0 1 25

Seq Scan on contact_functional_expertise (cost=0.00..14,785.29 rows=2 width=8) (actual time=304.886..307.276 rows=1 loops=25)

  • Filter: (contact_id = c.id)
  • Rows Removed by Filter: 783400
48. 0.050 0.675 ↓ 0.0 0 25

GroupAggregate (cost=0.71..8.79 rows=2 width=36) (actual time=0.027..0.027 rows=0 loops=25)

  • Group Key: cgc.contact_id
49. 0.050 0.625 ↓ 0.0 0 25

Nested Loop (cost=0.71..8.75 rows=2 width=25) (actual time=0.025..0.025 rows=0 loops=25)

50. 0.575 0.575 ↓ 0.0 0 25

Index Only Scan using contact_group_contact_idx on contact_group_contact cgc (cost=0.43..3.75 rows=2 width=8) (actual time=0.023..0.023 rows=0 loops=25)

  • Index Cond: (contact_id = c.id)
  • Heap Fetches: 0
51. 0.000 0.000 ↓ 0.0 0

Index Scan using contact_group_pkey on contact_group cg (cost=0.28..2.50 rows=1 width=29) (never executed)

  • Index Cond: (id = cgc.contact_group_id)