explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SUsi

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 1.446 ↓ 0.0 0 1

Aggregate (cost=143.74..144.07 rows=2 width=493) (actual time=1.446..1.446 rows=0 loops=1)

  • Buffers: shared hit=324
2. 0.048 1.444 ↓ 0.0 0 1

Sort (cost=143.74..143.74 rows=2 width=465) (actual time=1.444..1.444 rows=0 loops=1)

  • Sort Key: "*SELECT* 1".date, "*SELECT* 1".date_next, "*SELECT* 1".date_prev, "*SELECT* 1".ent_id, "*SELECT* 1".account_id, "*SELECT* 1".kbk_id, "*SELECT* 1".analytic1, "*SELECT* 1".analytic2, "*SELECT* 1".analytic3, "*SELECT* 1".analytic4, "*SELECT* 1".analytic5, "*SELECT* 1".analytic6, "*SELECT* 1".analytic7, "*SELECT* 1".analytic8, "*SELECT* 1".analytic9, "*SELECT* 1".analytic10, "*SELECT* 1".analytic11, "*SELECT* 1".analytic12, "*SELECT* 1".analytic13, "*SELECT* 1".analytic14, "*SELECT* 1".analytic15, "*SELECT* 1".analytic16, "*SELECT* 1".analytic17, "*SELECT* 1".analytic18, "*SELECT* 1".analytic19, "*SELECT* 1".analytic20, "*SELECT* 1".kvd_id, "*SELECT* 1".kosgu_id, "*SELECT* 1".kvd_analytic_id, "*SELECT* 1".closing, "*SELECT* 1".contract_id, "*SELECT* 1".document_type_id, "*SELECT* 1".past_years_return, "*SELECT* 1".currency_id, "*SELECT* 1".product_id, "*SELECT* 1".unit_id, "*SELECT* 1".fact_accounting, "*SELECT* 1".average_accounting, "*SELECT* 1".cost, "*SELECT* 1".internal, "*SELECT* 1".journal, "*SELECT* 1".transition
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=324
3. 0.000 1.396 ↓ 0.0 0 1

Result (cost=71.67..143.73 rows=2 width=465) (actual time=1.396..1.396 rows=0 loops=1)

  • Buffers: shared hit=324
4. 0.001 1.396 ↓ 0.0 0 1

Append (cost=71.67..143.71 rows=2 width=465) (actual time=1.396..1.396 rows=0 loops=1)

  • Buffers: shared hit=324
5. 0.002 0.748 ↓ 0.0 0 1

Subquery Scan on *SELECT* 1 (cost=71.67..71.85 rows=1 width=465) (actual time=0.748..0.748 rows=0 loops=1)

  • Buffers: shared hit=162
6. 0.000 0.746 ↓ 0.0 0 1

Aggregate (cost=71.67..71.84 rows=1 width=469) (actual time=0.746..0.746 rows=0 loops=1)

  • Buffers: shared hit=162
7. 0.027 0.746 ↓ 0.0 0 1

Sort (cost=71.67..71.68 rows=1 width=174) (actual time=0.746..0.746 rows=0 loops=1)

  • Sort Key: ae.operation_date, ae.ent_id, ae.debet_account_id, ae.debet_kbk_id, ae.debet_analytic1_id, ae.debet_analytic2_id, ae.debet_analytic3_id, ae.debet_analytic4_id, ae.debet_analytic5_id, ae.debet_analytic6_id, ae.debet_analytic7_id, ae.debet_analytic8_id, ae.debet_analytic9_id, ae.debet_analytic10_id, ae.debet_analytic11_id, ae.debet_analytic12_id, ae.debet_analytic13_id, ae.debet_analytic14_id, ae.debet_analytic15_id, ae.debet_analytic16_id, ae.debet_analytic17_id, ae.debet_analytic18_id, ae.debet_analytic19_id, ae.debet_analytic20_id, ae.kvd_id, ae.debet_kosgu_id, ae.debet_kvd_analytic_id, ae.closing, (COALESCE(aec1.contract_id, aec2.contract_id)), ae.document_type_id, ae.past_years_return, ae.currency_id, spec.product_id, spec.unit_id, spec.fact_accounting, spec.average_accounting, (COALESCE(spec.cost, 0.00::numeric(16,2))), (CASE WHEN (ae.debet_account_id = ae.credit_account_id) THEN true ELSE false END), ae.debet_journal, ae.transition
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=162
8. 0.000 0.719 ↓ 0.0 0 1

Nested Loop (cost=4.76..71.66 rows=1 width=174) (actual time=0.719..0.719 rows=0 loops=1)

  • Buffers: shared hit=162
9. 0.001 0.719 ↓ 0.0 0 1

Nested Loop (cost=4.76..68.9 rows=1 width=169) (actual time=0.719..0.719 rows=0 loops=1)

  • Buffers: shared hit=162
10. 0.001 0.718 ↓ 0.0 0 1

Nested Loop (cost=4.19..60.31 rows=1 width=148) (actual time=0.718..0.718 rows=0 loops=1)

  • Buffers: shared hit=162
11. 0.000 0.717 ↓ 0.0 0 1

Nested Loop (cost=3.76..51.85 rows=1 width=144) (actual time=0.717..0.717 rows=0 loops=1)

  • Buffers: shared hit=162
12. 0.102 0.717 ↓ 0.0 0 1

Hash Join (cost=3.32..43.38 rows=1 width=140) (actual time=0.717..0.717 rows=0 loops=1)

  • Buffers: shared hit=162
13. 0.533 0.533 ↓ 47.5 380 1

Index Scan using account_entry_operation_date on account_entry ae (cost=0.57..40.6 rows=8 width=140) (actual time=0.037..0.533 rows=380 loops=1)

  • Index Cond: ((ae.operation_date >= '2019-08-01'::date) AND (ae.operation_date <= '2019-08-31'::date))
  • Filter: (ae.state = 2)
  • Buffers: shared hit=162
14. 0.039 0.082 ↓ 1.6 165 1

Hash (cost=1.51..1.51 rows=100 width=4) (actual time=0.082..0.082 rows=165 loops=1)

15. 0.043 0.043 ↓ 1.6 165 1

Result (cost=0..0.51 rows=100 width=4) (actual time=0.008..0.043 rows=165 loops=1)

16. 0.000 0.000 ↓ 0.0 0 0

Index Scan using account_entry_contract_entry_id_key on account_entry_contract aec1 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (aec1.entry_id = ae.id)
17. 0.000 0.000 ↓ 0.0 0 0

Index Scan using account_entry_contract_second_entry_id_key on account_entry_contract aec2 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (aec2.second_entry_id = ae.id)
18. 0.000 0.000 ↓ 0.0 0 0

Index Scan using account_entry_spec_entry_id on account_entry_spec spec (cost=0.56..8.58 rows=1 width=25) (never executed)

  • Index Cond: (ae.id = spec.entry_id)
19. 0.000 0.000 ↓ 0.0 0 0

Result (cost=0..0.51 rows=100 width=4) (never executed)

20. 0.000 0.647 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2 (cost=71.67..71.85 rows=1 width=465) (actual time=0.647..0.647 rows=0 loops=1)

  • Buffers: shared hit=162
21. 0.001 0.647 ↓ 0.0 0 1

Aggregate (cost=71.67..71.84 rows=1 width=469) (actual time=0.647..0.647 rows=0 loops=1)

  • Buffers: shared hit=162
22. 0.032 0.646 ↓ 0.0 0 1

Sort (cost=71.67..71.68 rows=1 width=174) (actual time=0.646..0.646 rows=0 loops=1)

  • Sort Key: ae_1.operation_date, ae_1.ent_id, ae_1.credit_account_id, ae_1.credit_kbk_id, ae_1.credit_analytic1_id, ae_1.credit_analytic2_id, ae_1.credit_analytic3_id, ae_1.credit_analytic4_id, ae_1.credit_analytic5_id, ae_1.credit_analytic6_id, ae_1.credit_analytic7_id, ae_1.credit_analytic8_id, ae_1.credit_analytic9_id, ae_1.credit_analytic10_id, ae_1.credit_analytic11_id, ae_1.credit_analytic12_id, ae_1.credit_analytic13_id, ae_1.credit_analytic14_id, ae_1.credit_analytic15_id, ae_1.credit_analytic16_id, ae_1.credit_analytic17_id, ae_1.credit_analytic18_id, ae_1.credit_analytic19_id, ae_1.credit_analytic20_id, ae_1.kvd_id, ae_1.credit_kosgu_id, ae_1.credit_kvd_analytic_id, ae_1.closing, (COALESCE(aec1_1.contract_id, aec2_1.contract_id)), ae_1.document_type_id, ae_1.past_years_return, ae_1.currency_id, spec_1.product_id, spec_1.unit_id, spec_1.fact_accounting, spec_1.average_accounting, (COALESCE(spec_1.cost, 0.00::numeric(16,2))), (CASE WHEN (ae_1.debet_account_id = ae_1.credit_account_id) THEN true ELSE false END), ae_1.credit_journal, ae_1.transition
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=162
23. 0.000 0.614 ↓ 0.0 0 1

Nested Loop (cost=4.76..71.66 rows=1 width=174) (actual time=0.614..0.614 rows=0 loops=1)

  • Buffers: shared hit=162
24. 0.002 0.614 ↓ 0.0 0 1

Nested Loop (cost=4.76..68.9 rows=1 width=169) (actual time=0.614..0.614 rows=0 loops=1)

  • Buffers: shared hit=162
25. 0.000 0.612 ↓ 0.0 0 1

Nested Loop (cost=4.19..60.31 rows=1 width=148) (actual time=0.612..0.612 rows=0 loops=1)

  • Buffers: shared hit=162
26. 0.000 0.612 ↓ 0.0 0 1

Nested Loop (cost=3.76..51.85 rows=1 width=144) (actual time=0.612..0.612 rows=0 loops=1)

  • Buffers: shared hit=162
27. 0.162 0.612 ↓ 0.0 0 1

Hash Join (cost=3.32..43.38 rows=1 width=140) (actual time=0.612..0.612 rows=0 loops=1)

  • Buffers: shared hit=162
28. 0.353 0.353 ↓ 47.5 380 1

Index Scan using account_entry_operation_date on account_entry ae_1 (cost=0.57..40.6 rows=8 width=140) (actual time=0.025..0.353 rows=380 loops=1)

  • Index Cond: ((ae_1.operation_date >= '2019-08-01'::date) AND (ae_1.operation_date <= '2019-08-31'::date))
  • Filter: (ae_1.state = 2)
  • Buffers: shared hit=162
29. 0.040 0.097 ↓ 1.6 165 1

Hash (cost=1.51..1.51 rows=100 width=4) (actual time=0.097..0.097 rows=165 loops=1)

30. 0.057 0.057 ↓ 1.6 165 1

Result (cost=0..0.51 rows=100 width=4) (actual time=0.019..0.057 rows=165 loops=1)

31. 0.000 0.000 ↓ 0.0 0 0

Index Scan using account_entry_contract_entry_id_key on account_entry_contract aec1_1 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (aec1_1.entry_id = ae_1.id)
32. 0.000 0.000 ↓ 0.0 0 0

Index Scan using account_entry_contract_second_entry_id_key on account_entry_contract aec2_1 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (aec2_1.second_entry_id = ae_1.id)
33. 0.000 0.000 ↓ 0.0 0 0

Index Scan using account_entry_spec_entry_id on account_entry_spec spec_1 (cost=0.56..8.58 rows=1 width=25) (never executed)

  • Index Cond: (ae_1.id = spec_1.entry_id)
34. 0.000 0.000 ↓ 0.0 0 0

Result (cost=0..0.51 rows=100 width=4) (never executed)