explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MCth : Optimization for: plan #SRg

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.006 78,857.332 ↓ 2.0 2 1

Unique (cost=2,646,371.23..2,646,371.30 rows=1 width=778) (actual time=78,857.329..78,857.332 rows=2 loops=1)

2. 0.079 78,857.326 ↓ 2.0 2 1

Sort (cost=2,646,371.23..2,646,371.23 rows=1 width=778) (actual time=78,857.326..78,857.326 rows=2 loops=1)

  • Sort Key: c1.name, c1.id, c1."primaryPhone", c1."alternativePhone", c1.email, c1.address1, c1.address2, c1.city, c1.state, c1."zipCode", c1.recruiter, c1.worklist, c1."hiddenFromWorklist", c1."applicationDate", c1."lastUpdatedDat
  • Sort Method: quicksort Memory: 25kB
3. 64,340.608 78,857.247 ↓ 2.0 2 1

Nested Loop Semi Join (cost=0.00..2,646,371.22 rows=1 width=778) (actual time=77,472.948..78,857.247 rows=2 loops=1)

  • Join Filter: ((c1.id <> c2.id) AND ((((c1."primaryPhone")::text <> ''::text) AND (((c1."primaryPhone")::text = (c2."primaryPhone")::text) OR ((c1."primaryPhone")::text = (c2."alternativePhone")::text))) OR (((c1."alternativ
  • Rows Removed by Join Filter: 117440144
4. 44.951 44.951 ↓ 1.2 10,824 1

Seq Scan on candidates c1 (cost=0.00..570.54 rows=8,877 width=774) (actual time=0.020..44.951 rows=10,824 loops=1)

  • Filter: ((("primaryPhone")::text <> ''::text) OR (("alternativePhone")::text <> ''::text))
  • Rows Removed by Filter: 26
5. 14,466.389 14,471.688 ↓ 1.0 10,850 10,824

Materialize (cost=0.00..570.54 rows=10,836 width=19) (actual time=0.000..1.337 rows=10,850 loops=10,824)

6. 5.299 5.299 ↓ 1.0 10,850 1

Seq Scan on candidates c2 (cost=0.00..516.36 rows=10,836 width=19) (actual time=0.003..5.299 rows=10,850 loops=1)

Planning time : 0.672 ms
Execution time : 78,857.609 ms