explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cq70 : Optimization for: Optimization for: plan #7CQK; plan #j0qD

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 1.974 90.822 ↓ 4,725.0 4,725 1

Unique (cost=447.50..447.53 rows=1 width=87) (actual time=88.416..90.822 rows=4,725 loops=1)

2. 3.160 88.848 ↓ 4,725.0 4,725 1

Sort (cost=447.50..447.50 rows=1 width=87) (actual time=88.416..88.848 rows=4,725 loops=1)

  • Sort Key: account_entry.id, account_entry.summa, kbk.full_code, kbk.kbk_type, account_entry.debet_kbk_id, account_entry.credit_kbk_id, t9.debet_kbk_id, t9.credit_kbk_id, account_entry.credit_account_id, account_entry.debet_kvd_analytic_id, account_ (...)
  • Sort Method: quicksort Memory: 857kB
3. 2.244 85.688 ↓ 4,725.0 4,725 1

Nested Loop Left Join (cost=1.85..447.49 rows=1 width=87) (actual time=0.051..85.688 rows=4,725 loops=1)

4. 1.170 83.444 ↓ 4,725.0 4,725 1

Nested Loop Left Join (cost=1.29..439.65 rows=1 width=67) (actual time=0.050..83.444 rows=4,725 loops=1)

5. 0.732 72.824 ↓ 4,725.0 4,725 1

Nested Loop Left Join (cost=0.85..431.19 rows=1 width=63) (actual time=0.043..72.824 rows=4,725 loops=1)

6. 62.642 62.642 ↓ 4,725.0 4,725 1

Index Scan using account_entry_debet_account_kvd on account_entry (cost=0.57..422.88 rows=1 width=38) (actual time=0.035..62.642 rows=4,725 loops=1)

  • Index Cond: ((debet_account_id = 186837) AND (kvd_id = 2651))
  • Filter: ((NOT transition) AND (operation_date >= '2019-01-01'::date) AND (operation_date <= '2019-06-30'::date) AND (state = 2) AND (ent_id = 1484) AND (debet_kbk_id = ANY ('{35843,43651,46215,46216,5897,42761,44939,46217,43 (...)
  • Rows Removed by Filter: 36501
7. 9.450 9.450 ↑ 1.0 1 4,725

Index Scan using kbk_pkey on kbk (cost=0.29..8.30 rows=1 width=29) (actual time=0.001..0.002 rows=1 loops=4,725)

  • Index Cond: (account_entry.debet_kbk_id = id)
8. 9.450 9.450 ↓ 0.0 0 4,725

Index Scan using operation_entry_main_entry_id on operation_entry (cost=0.43..8.45 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=4,725)

  • Index Cond: (account_entry.id = main_entry_id)
9. 0.000 0.000 ↓ 0.0 0 4,725

Index Scan using account_entry_pkey on account_entry t9 (cost=0.57..7.82 rows=1 width=12) (actual time=0.000..0.000 rows=0 loops=4,725)

  • Index Cond: (operation_entry.offbalance_entry_id = id)
Planning time : 1.573 ms
Execution time : 91.085 ms