explain.depesz.com

PostgreSQL's explain analyze made readable

Result: p8GA : Optimization for: Optimization for: plan #SIHR; plan #Oio

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.407 20.890 ↓ 19.0 19 1

Sort (cost=46.71..46.72 rows=1 width=234) (actual time=20.706..20.890 rows=19 loops=1)

  • Sort Key: c1.name
  • Sort Method: quicksort Memory: 30kB
2. 9.868 20.483 ↓ 19.0 19 1

Nested Loop Semi Join (cost=0.00..46.70 rows=1 width=234) (actual time=1.958..20.483 rows=19 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: 859
3. 0.826 0.826 ↑ 1.0 39 1

Seq Scan on candidates c1 (cost=0.00..2.39 rows=39 width=234) (actual time=0.366..0.826 rows=39 loops=1)

4. 8.907 9.789 ↑ 1.7 23 39

Materialize (cost=0.00..2.58 rows=39 width=21) (actual time=0.022..0.251 rows=23 loops=39)

5. 0.882 0.882 ↑ 1.0 39 1

Seq Scan on candidates c2 (cost=0.00..2.39 rows=39 width=21) (actual time=0.487..0.882 rows=39 loops=1)

Planning time : 8.627 ms
Execution time : 21.207 ms