explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4nN

Settings
# exclusive inclusive rows x rows loops node
1. 0.013 752.996 ↑ 246.6 8 1

Unique (cost=145,182.02..145,189.91 rows=1,973 width=398) (actual time=752.984..752.996 rows=8 loops=1)

2. 0.000 752.983 ↑ 246.6 8 1

Sort (cost=145,182.02..145,183.00 rows=1,973 width=398) (actual time=752.982..752.983 rows=8 loops=1)

  • Sort Key: k.score DESC, (CASE WHEN (a.mentorship_limit = '-1'::integer) THEN NULL::integer ELSE a.mentorship_limit END) DESC, k.mentor_id, a.mentorship_limit, ((a.rejected)::jsonb), k.match_equation, ((a.match_data)::jsonb)
  • Sort Method: quicksort Memory: 31kB
3. 123.758 800.410 ↑ 246.6 8 1

Gather (cost=144,814.90..145,160.42 rows=1,973 width=398) (actual time=657.935..800.410 rows=8 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 12.665 676.652 ↑ 274.0 3 3

Merge Join (cost=143,814.90..143,960.24 rows=822 width=398) (actual time=676.634..676.652 rows=3 loops=3)

  • Merge Cond: ((a.job_id = k.job_id) AND (a.user_id = k.mentor_id))
5. 144.806 202.946 ↑ 1.3 56,773 3

Sort (cost=43,865.99..43,901.54 rows=71,087 width=793) (actual time=195.210..202.946 rows=56,773 loops=3)

  • Sort Key: a.job_id, a.user_id
  • Sort Method: quicksort Memory: 92815kB
6. 58.140 58.140 ↑ 1.2 57,550 3

Parallel Seq Scan on bulk_match_users_info a (cost=0.00..42,720.26 rows=71,087 width=793) (actual time=0.015..58.140 rows=57,550 loops=3)

7. 0.025 461.041 ↑ 2,850.0 8 3

Sort (cost=99,948.90..99,960.30 rows=22,800 width=330) (actual time=461.039..461.041 rows=8 loops=3)

  • Sort Key: k.job_id, k.mentor_id
  • Sort Method: quicksort Memory: 25kB
8. 0.004 461.016 ↑ 2,850.0 8 3

Subquery Scan on k (cost=0.00..99,618.83 rows=22,800 width=330) (actual time=404.771..461.016 rows=8 loops=3)

9. 0.010 461.012 ↑ 2,850.0 8 3

ProjectSet (cost=0.00..99,550.43 rows=22,800 width=334) (actual time=404.770..461.012 rows=8 loops=3)

10. 0.002 461.002 ↑ 76.0 3 3

Subquery Scan on t (cost=0.00..99,515.78 rows=228 width=359) (actual time=404.766..461.002 rows=3 loops=3)

  • Filter: (t.k = 6640315)
11. 0.027 461.000 ↑ 15,200.0 3 3

ProjectSet (cost=0.00..99,356.18 rows=45,600 width=419) (actual time=404.764..461.000 rows=3 loops=3)

12. 460.973 460.973 ↑ 152.0 3 3

Seq Scan on bulk_match_precomputed (cost=0.00..99,282.53 rows=456 width=356) (actual time=404.750..460.973 rows=3 loops=3)

  • Filter: ((job_id = 6617) AND ((((COALESCE((((match_equation ->> 'favorites'::text))::numeric * '100'::numeric), '0'::numeric) + COALESCE((((match_equation ->> 'major'::text))::numeric * '0'::numeric), '0'::numeric)) + COALESCE((((match_equation ->> 'location'::text))::numeric * '50'::numeric), '0'::numeric)) + COALESCE((((match_equation ->> 'industry-interests'::text))::numeric * '50'::numeric), '0'::numeric)) <> '0'::numeric))
  • Rows Removed by Filter: 1448830
Planning time : 0.443 ms
Execution time : 805.358 ms