explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SRg

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.006 104,287.239 ↑ 4,438.5 2 1

Unique (cost=62,623,384.47..65,497,122.22 rows=8,877 width=778) (actual time=104,287.235..104,287.239 rows=2 loops=1)

2. 0.121 104,287.233 ↑ 19,818,881.0 2 1

Sort (cost=62,623,384.47..62,722,478.88 rows=39,637,762 width=778) (actual time=104,287.233..104,287.233 rows=2 loops=1)

  • Sort Key: candidates.name, candidates.id, candidates."primaryPhone", candidates."alternativePhone", candidates.email, candidates.address1, candidates.address2, candidates.city, candidates.state, candidates."zipCode", candidates.r
  • Sort Method: quicksort Memory: 25kB
3. 87,255.287 104,287.112 ↑ 19,818,881.0 2 1

Nested Loop (cost=0.00..2,886,849.15 rows=39,637,762 width=778) (actual time=102,363.543..104,287.112 rows=2 loops=1)

  • Join Filter: ((candidates.id <> c2.id) AND (((candidates."primaryPhone" IS NOT NULL) AND ((candidates."primaryPhone")::text <> ''::text) AND (((candidates."primaryPhone")::text = (c2."primaryPhone")::text) OR ((candidates.
  • Rows Removed by Join Filter: 117440398
4. 59.793 59.793 ↓ 1.2 10,824 1

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

  • Filter: ((("primaryPhone" IS NOT NULL) AND (("primaryPhone")::text <> ''::text)) OR (("alternativePhone" IS NOT NULL) AND (("alternativePhone")::text <> ''::text)))
  • Rows Removed by Filter: 26
5. 16,958.312 16,972.032 ↓ 1.0 10,850 10,824

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

6. 13.720 13.720 ↓ 1.0 10,850 1

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

Planning time : 0.971 ms
Execution time : 104,287.635 ms