explain.depesz.com

PostgreSQL's explain analyze made readable

Result: f2m6A : Optimization for: Optimization for: plan #SRg; plan #MCth

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.042 73,740.453 ↓ 0.0 0 1

Sort (cost=2,646,371.23..2,646,371.23 rows=1 width=774) (actual time=73,740.453..73,740.453 rows=0 loops=1)

  • Sort Key: c1.name
  • Sort Method: quicksort Memory: 25kB
2. 59,733.007 73,740.411 ↓ 0.0 0 1

Nested Loop Semi Join (cost=0.00..2,646,371.22 rows=1 width=774) (actual time=73,740.411..73,740.411 rows=0 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."alternativePhone
  • Rows Removed by Join Filter: 117418727
3. 45.734 45.734 ↓ 1.2 10,823 1

Seq Scan on candidates c1 (cost=0.00..570.54 rows=8,877 width=774) (actual time=0.013..45.734 rows=10,823 loops=1)

  • Filter: ((("primaryPhone")::text <> ''::text) OR (("alternativePhone")::text <> ''::text))
  • Rows Removed by Filter: 26
4. 13,956.226 13,961.670 ↓ 1.0 10,849 10,823

Materialize (cost=0.00..570.54 rows=10,836 width=19) (actual time=0.000..1.290 rows=10,849 loops=10,823)

5. 5.444 5.444 ↓ 1.0 10,849 1

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

Planning time : 1.366 ms
Execution time : 73,740.888 ms