explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8Y7n : boom

Settings
# exclusive inclusive rows x rows loops node
1. 0.024 11.758 ↓ 6.0 6 1

Hash Join (cost=2,190.00..3,169.14 rows=1 width=5,684) (actual time=0.295..11.758 rows=6 loops=1)

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

CTE clients_filtered

3. 0.015 0.072 ↑ 18.8 8 1

Nested Loop (cost=0.29..1,078.75 rows=150 width=175) (actual time=0.025..0.072 rows=8 loops=1)

4. 0.009 0.009 ↑ 18.8 8 1

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

5. 0.048 0.048 ↑ 1.0 1 8

Index Scan using clients_pkey on clients c_1 (cost=0.29..7.10 rows=1 width=175) (actual time=0.006..0.006 rows=1 loops=8)

  • Index Cond: ((client_key)::text = (cfa.client_key)::text)
6.          

CTE accounts_filtered

7. 0.018 0.118 ↑ 12.5 12 1

Nested Loop (cost=0.41..1,101.50 rows=150 width=744) (actual time=0.016..0.118 rows=12 loops=1)

8. 0.004 0.004 ↑ 12.5 12 1

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

9. 0.096 0.096 ↑ 1.0 1 12

Index Scan using accounts_pkey on accounts a_1 (cost=0.41..7.26 rows=1 width=744) (actual time=0.007..0.008 rows=1 loops=12)

  • Index Cond: ((account_key)::text = (afa.account_key)::text)
10. 6.133 11.635 ↑ 12.5 12 1

Hash Join (cost=4.88..983.44 rows=150 width=2,601) (actual time=0.177..11.635 rows=12 loops=1)

  • Hash Cond: ((r.account_key)::text = (a.account_key)::text)
11. 5.355 5.355 ↑ 1.0 24,150 1

Seq Scan on client_accounts r (cost=0.00..886.50 rows=24,150 width=44) (actual time=0.003..5.355 rows=24,150 loops=1)

12. 0.007 0.147 ↑ 12.5 12 1

Hash (cost=3.00..3.00 rows=150 width=3,096) (actual time=0.147..0.147 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
13. 0.140 0.140 ↑ 12.5 12 1

CTE Scan on accounts_filtered a (cost=0.00..3.00 rows=150 width=3,096) (actual time=0.019..0.140 rows=12 loops=1)

14. 0.010 0.099 ↑ 18.8 8 1

Hash (cost=3.00..3.00 rows=150 width=3,096) (actual time=0.099..0.099 rows=8 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
15. 0.089 0.089 ↑ 18.8 8 1

CTE Scan on clients_filtered c (cost=0.00..3.00 rows=150 width=3,096) (actual time=0.028..0.089 rows=8 loops=1)