explain.depesz.com

PostgreSQL's explain analyze made readable

Result: aKYC : Optimization for: Optimization for: transactions; plan #rZdw; plan #JNIX

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 522.247 908.719 ↑ 1.0 2,786,124 1

Hash Left Join (cost=13,766.90..68,345.09 rows=2,786,124 width=17) (actual time=197.438..908.719 rows=2,786,124 loops=1)

  • Hash Cond: (transactions.account_id = accounts_transactions.id)
2. 117.248 211.032 ↑ 1.0 464,354 1

Hash Join (cost=1,457.50..17,149.91 rows=464,354 width=20) (actual time=21.178..211.032 rows=464,354 loops=1)

  • Hash Cond: (transactions.account_id = imported_accounts.id)
3. 78.305 78.305 ↑ 1.0 464,354 1

Seq Scan on transactions (cost=0.00..9,307.54 rows=464,354 width=20) (actual time=5.386..78.305 rows=464,354 loops=1)

4. 8.179 15.479 ↑ 1.0 40,060 1

Hash (cost=956.75..956.75 rows=40,060 width=4) (actual time=15.479..15.479 rows=40,060 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 1921kB
5. 7.300 7.300 ↑ 1.0 40,060 1

Seq Scan on imported_accounts (cost=0.00..956.75 rows=40,060 width=4) (actual time=0.016..7.300 rows=40,060 loops=1)

  • Filter: (budget_lea_id = 15)
6. 53.623 175.440 ↑ 1.0 240,360 1

Hash (cost=8,365.90..8,365.90 rows=240,360 width=4) (actual time=175.440..175.440 rows=240,360 loops=1)

  • Buckets: 131072 Batches: 4 Memory Usage: 3153kB
7. 85.460 121.817 ↑ 1.0 240,360 1

Hash Right Join (cost=1,357.35..8,365.90 rows=240,360 width=4) (actual time=14.528..121.817 rows=240,360 loops=1)

  • Hash Cond: (imported_account_segments.account_id = accounts_transactions.id)
8. 22.090 22.090 ↑ 1.0 240,360 1

Seq Scan on imported_account_segments (cost=0.00..3,703.60 rows=240,360 width=4) (actual time=0.012..22.090 rows=240,360 loops=1)

9. 8.329 14.267 ↑ 1.0 40,060 1

Hash (cost=856.60..856.60 rows=40,060 width=4) (actual time=14.267..14.267 rows=40,060 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 1921kB
10. 5.938 5.938 ↑ 1.0 40,060 1

Seq Scan on imported_accounts accounts_transactions (cost=0.00..856.60 rows=40,060 width=4) (actual time=0.011..5.938 rows=40,060 loops=1)

Planning time : 0.340 ms
Execution time : 1,022.440 ms