explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nmvP : with-test

Settings
# exclusive inclusive rows x rows loops node
1. 6.880 37.590 ↑ 1,235.9 12 1

Hash Join (cost=3,159.31..4,967.03 rows=14,831 width=71) (actual time=24.943..37.590 rows=12 loops=1)

  • Hash Cond: ((c.client_key)::text = (r.client_key)::text)
2.          

CTE client_keys

3. 0.009 0.009 ↑ 18.8 8 1

Seq Scan on clients_fa_tmp (cost=0.00..11.50 rows=150 width=516) (actual time=0.004..0.009 rows=8 loops=1)

4.          

CTE account_keys

5. 0.005 0.005 ↑ 12.5 12 1

Seq Scan on accounts_fa_tmp (cost=0.00..11.50 rows=150 width=516) (actual time=0.004..0.005 rows=12 loops=1)

6. 5.834 5.834 ↑ 1.0 21,761 1

Seq Scan on clients c (cost=0.00..1,550.61 rows=21,761 width=32) (actual time=0.005..5.834 rows=21,761 loops=1)

7. 0.013 24.876 ↑ 1,235.9 12 1

Hash (cost=2,950.92..2,950.92 rows=14,831 width=52) (actual time=24.876..24.876 rows=12 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 129kB
8. 0.117 24.863 ↑ 1,235.9 12 1

Hash Join (cost=1,727.44..2,950.92 rows=14,831 width=52) (actual time=17.259..24.863 rows=12 loops=1)

  • Hash Cond: ((r.account_key)::text = (a.account_key)::text)
9. 7.645 7.670 ↑ 1,293.7 14 1

Seq Scan on client_accounts r (cost=6.75..1,014.00 rows=18,112 width=44) (actual time=0.077..7.670 rows=14 loops=1)

  • Filter: ((hashed SubPlan 3) OR (hashed SubPlan 4))
  • Rows Removed by Filter: 24136
10.          

SubPlan (forSeq Scan)

11. 0.015 0.015 ↑ 18.8 8 1

CTE Scan on client_keys (cost=0.00..3.00 rows=150 width=516) (actual time=0.006..0.015 rows=8 loops=1)

12. 0.010 0.010 ↑ 12.5 12 1

CTE Scan on account_keys (cost=0.00..3.00 rows=150 width=516) (actual time=0.005..0.010 rows=12 loops=1)

13. 7.966 17.076 ↑ 1.0 19,764 1

Hash (cost=1,473.64..1,473.64 rows=19,764 width=54) (actual time=17.076..17.076 rows=19,764 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1821kB
14. 9.110 9.110 ↑ 1.0 19,764 1

Seq Scan on accounts a (cost=0.00..1,473.64 rows=19,764 width=54) (actual time=0.005..9.110 rows=19,764 loops=1)