explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ry6F

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Unique (cost=3,318,563.40..3,318,563.44 rows=1 width=94) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=3,318,563.40..3,318,563.40 rows=1 width=94) (actual rows= loops=)

  • Sort Key: account_entry.id, account_entry.summa, account_chart.code, kbk_activity_type.code, kbk.kbk_type, kbk.full_code, account_entry.debet_kbk_id, account_entry.credit_kbk_id, t10.debet_kbk_id, t10.credit_kbk_id, account_entry.credit_account_id, (...)
3. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=3,302,184.67..3,318,563.39 rows=1 width=94) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=3,302,184.11..3,318,561.28 rows=1 width=74) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=3,302,183.67..3,318,558.62 rows=1 width=70) (actual rows= loops=)

  • Join Filter: (account_entry.kvd_id = kbk_activity_type.id)
6. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=3,302,183.38..3,318,556.10 rows=1 width=68) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=3,302,182.96..3,318,553.45 rows=1 width=43) (actual rows= loops=)

  • Join Filter: (account_entry.debet_account_id = account_chart.id)
8. 0.000 0.000 ↓ 0.0

Index Scan using account_ent_debet_k_eb084e_partial on account_entry (cost=3,302,182.53..3,318,550.78 rows=1 width=38) (actual rows= loops=)

  • Index Cond: (debet_kbk_id = ANY ('{269867,459695,448627,448628,448629,448630,448631,448632,448633,448634,448635,448636,448637,448639}'::integer[]))
  • Filter: ((operation_date >= '2019-01-01'::date) AND (operation_date <= '2019-03-31'::date) AND ((NOT (hashed SubPlan 1)) OR (NOT is_technical)) AND (debet_account_id = 1378666) AND (kvd_id = 19208) AND (state = 2 (...)
9.          

SubPlan (forIndex Scan)

10. 0.000 0.000 ↓ 0.0

Gather (cost=1,000.00..3,302,130.94 rows=20,409 width=4) (actual rows= loops=)

  • Workers Planned: 8
11. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on document_acc_entry_template u2 (cost=0.00..3,299,090.04 rows=2,551 width=4) (actual rows= loops=)

  • Filter: (yc_function = ANY ('{9,10,11}'::integer[]))
12. 0.000 0.000 ↓ 0.0

Index Scan using account_chart_pkey on account_chart (cost=0.43..2.65 rows=1 width=9) (actual rows= loops=)

  • Index Cond: (id = 1378666)
13. 0.000 0.000 ↓ 0.0

Index Scan using kbk_pkey on kbk (cost=0.42..2.64 rows=1 width=29) (actual rows= loops=)

  • Index Cond: (account_entry.debet_kbk_id = id)
14. 0.000 0.000 ↓ 0.0

Index Scan using kbk_activity_type_pkey on kbk_activity_type (cost=0.29..2.51 rows=1 width=6) (actual rows= loops=)

  • Index Cond: (id = 19208)
15. 0.000 0.000 ↓ 0.0

Index Scan using operation_entry_main_entry_id on operation_entry (cost=0.43..2.65 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (account_entry.id = main_entry_id)
16. 0.000 0.000 ↓ 0.0

Index Scan using account_entry_pkey on account_entry t10 (cost=0.56..2.10 rows=1 width=12) (actual rows= loops=)

  • Index Cond: (operation_entry.offbalance_entry_id = id)