explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 48FG

Settings
# exclusive inclusive rows x rows loops node
1. 65.149 10,172.344 ↑ 1.0 1 1

Aggregate (cost=630,355.69..630,355.70 rows=1 width=8) (actual time=10,172.344..10,172.344 rows=1 loops=1)

2. 92.194 10,107.195 ↑ 7.8 524,220 1

Hash Join (cost=1,192.30..620,184.04 rows=4,068,662 width=4) (actual time=7,030.130..10,107.195 rows=524,220 loops=1)

  • Hash Cond: (line.statement_id = st.id)
3. 2,026.442 10,005.940 ↑ 7.8 524,220 1

Merge Anti Join (cost=0.99..608,308.33 rows=4,068,662 width=8) (actual time=7,020.973..10,005.940 rows=524,220 loops=1)

  • Merge Cond: (line.id = aml.statement_line_id)
4. 2,375.355 2,375.355 ↑ 1.0 4,208,735 1

Index Scan using account_bank_statement_line_pkey on account_bank_statement_line line (cost=0.43..173,133.24 rows=4,321,211 width=8) (actual time=0.010..2,375.355 rows=4,208,735 loops=1)

  • Filter: (amount <> 0.0)
  • Rows Removed by Filter: 144
5. 5,604.143 5,604.143 ↑ 4.5 7,369,313 1

Index Only Scan using account_move_line_statement_line_id_index on account_move_line aml (cost=0.56..1,574,942.11 rows=33,447,558 width=4) (actual time=0.031..5,604.143 rows=7,369,313 loops=1)

  • Heap Fetches: 7,384,782
6. 1.687 9.061 ↑ 1.0 10,884 1

Hash (cost=1,055.26..1,055.26 rows=10,884 width=4) (actual time=9.061..9.061 rows=10,884 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 511kB
7. 7.374 7.374 ↑ 1.0 10,884 1

Seq Scan on account_bank_statement st (cost=0.00..1,055.26 rows=10,884 width=4) (actual time=0.016..7.374 rows=10,884 loops=1)

  • Filter: ((journal_id = 17) AND ((state)::text = 'open'::text))
Planning time : 4.520 ms
Execution time : 10,172.501 ms