explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Oio : Optimization for: plan #SIHR

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.406 20.857 ↓ 19.0 19 1

Sort (cost=46.71..46.72 rows=1 width=1,552) (actual time=20.664..20.857 rows=19 loops=1)

  • Sort Key: c1.name
  • Sort Method: quicksort Memory: 26kB
2. 9.825 20.451 ↓ 19.0 19 1

Nested Loop Semi Join (cost=0.00..46.70 rows=1 width=1,552) (actual time=2.015..20.451 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.915 0.915 ↑ 1.0 39 1

Seq Scan on candidates c1 (cost=0.00..2.39 rows=39 width=1,552) (actual time=0.525..0.915 rows=39 loops=1)

4. 8.849 9.711 ↑ 1.7 23 39

Materialize (cost=0.00..2.58 rows=39 width=1,036) (actual time=0.021..0.249 rows=23 loops=39)

5. 0.862 0.862 ↑ 1.0 39 1

Seq Scan on candidates c2 (cost=0.00..2.39 rows=39 width=1,036) (actual time=0.458..0.862 rows=39 loops=1)

Planning time : 10.839 ms
Execution time : 21.219 ms