explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5wfU

Settings

Optimization(s) for this plan:

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

Limit (cost=112.69..113.58 rows=1 width=2,940) (actual time=3.678..3.678 rows=0 loops=1)

2. 0.000 3.678 ↓ 0.0 0 1

Unique (cost=112.69..113.58 rows=1 width=2,940) (actual time=3.678..3.678 rows=0 loops=1)

3. 0.221 3.678 ↓ 0.0 0 1

Sort (cost=112.69..112.69 rows=1 width=2,940) (actual time=3.678..3.678 rows=0 loops=1)

  • Sort Key: account_entry.operation_num, account_entry.id, account_entry.document_type_id, account_entry.old_document_id, account_entry.document_number, account_entry.document_date, account_entry.state, account_entry.description, account_entry. (...)
  • Sort Method: quicksort Memory: 25kB
4. 0.000 3.457 ↓ 0.0 0 1

Nested Loop Left Join (cost=74.66..112.68 rows=1 width=2,940) (actual time=3.457..3.457 rows=0 loops=1)

5. 0.001 3.457 ↓ 0.0 0 1

Nested Loop Left Join (cost=74.24..110.02 rows=1 width=2,916) (actual time=3.457..3.457 rows=0 loops=1)

6. 0.000 3.456 ↓ 0.0 0 1

Nested Loop Left Join (cost=73.80..108.33 rows=1 width=2,695) (actual time=3.456..3.456 rows=0 loops=1)

7. 0.000 3.456 ↓ 0.0 0 1

Nested Loop Left Join (cost=73.37..105.67 rows=1 width=2,643) (actual time=3.456..3.456 rows=0 loops=1)

8. 0.000 3.456 ↓ 0.0 0 1

Nested Loop Left Join (cost=72.94..103.02 rows=1 width=2,526) (actual time=3.456..3.456 rows=0 loops=1)

9. 0.000 3.456 ↓ 0.0 0 1

Nested Loop Left Join (cost=72.51..100.36 rows=1 width=2,374) (actual time=3.456..3.456 rows=0 loops=1)

10. 0.001 3.457 ↓ 0.0 0 1

Nested Loop Left Join (cost=72.09..97.71 rows=1 width=2,257) (actual time=3.456..3.457 rows=0 loops=1)

11. 0.001 3.456 ↓ 0.0 0 1

Nested Loop Left Join (cost=71.66..95.05 rows=1 width=2,105) (actual time=3.456..3.456 rows=0 loops=1)

12. 0.001 3.455 ↓ 0.0 0 1

Nested Loop Left Join (cost=71.23..92.39 rows=1 width=1,919) (actual time=3.455..3.455 rows=0 loops=1)

13. 0.000 3.454 ↓ 0.0 0 1

Nested Loop Left Join (cost=70.80..89.74 rows=1 width=1,733) (actual time=3.454..3.454 rows=0 loops=1)

14. 0.000 3.454 ↓ 0.0 0 1

Nested Loop Left Join (cost=70.37..87.08 rows=1 width=1,561) (actual time=3.454..3.454 rows=0 loops=1)

15. 0.000 3.454 ↓ 0.0 0 1

Nested Loop Left Join (cost=69.93..84.42 rows=1 width=1,389) (actual time=3.454..3.454 rows=0 loops=1)

16. 0.000 3.454 ↓ 0.0 0 1

Nested Loop Left Join (cost=69.51..81.76 rows=1 width=1,196) (actual time=3.454..3.454 rows=0 loops=1)

17. 0.001 3.454 ↓ 0.0 0 1

Nested Loop Left Join (cost=69.08..79.11 rows=1 width=1,003) (actual time=3.454..3.454 rows=0 loops=1)

18. 0.000 3.453 ↓ 0.0 0 1

Nested Loop (cost=68.79..76.59 rows=1 width=880) (actual time=3.453..3.453 rows=0 loops=1)

19. 0.000 3.453 ↓ 0.0 0 1

Nested Loop (cost=68.36..73.93 rows=1 width=701) (actual time=3.453..3.453 rows=0 loops=1)

20. 0.001 3.454 ↓ 0.0 0 1

Nested Loop (cost=67.93..71.28 rows=1 width=548) (actual time=3.453..3.454 rows=0 loops=1)

21. 0.018 3.453 ↓ 0.0 0 1

Bitmap Heap Scan on account_entry (cost=67.50..68.61 rows=1 width=365) (actual time=3.453..3.453 rows=0 loops=1)

  • Recheck Cond: ((document_id = 24263135) AND (ent_id = 7525))
  • Filter: (block = 2)
  • Rows Removed by Filter: 2
  • Heap Blocks: exact=1
22. 3.214 3.435 ↓ 0.0 0 1

BitmapAnd (cost=67.50..67.50 rows=1 width=0) (actual time=3.435..3.435 rows=0 loops=1)

  • -> Bitmap Index Scan on account_entry_ent_id (cost=0.00..64.67 rows=5761 width=0) (actual time=3.213..3.213 rows=29230 loops=1 (...)
23. 0.221 0.221 ↑ 40.3 3 1

Bitmap Index Scan on account_entry_document_id (cost=0.00..2.57 rows=121 width=0) (actual time=0.221..0.221 rows=3 loops=1)

  • Index Cond: (document_id = 24263135)
  • Index Cond: (ent_id = 7525)
24. 0.000 0.000 ↓ 0.0 0

Index Scan using document_base_pkey on document_base (cost=0.43..2.65 rows=1 width=183) (never executed)

  • Index Cond: (id = 24263135)
25. 0.000 0.000 ↓ 0.0 0

Index Scan using document_types_pkey on document_types (cost=0.43..2.65 rows=1 width=153) (never executed)

  • Index Cond: (id = account_entry.document_type_id)
26. 0.000 0.000 ↓ 0.0 0

Index Scan using document_operations_pkey on document_operations (cost=0.43..2.65 rows=1 width=179) (never executed)

  • Index Cond: (id = account_entry.operation_id)
27. 0.000 0.000 ↓ 0.0 0

Index Scan using kbk_activity_type_pkey on kbk_activity_type (cost=0.29..2.51 rows=1 width=123) (never executed)

  • Index Cond: (account_entry.kvd_id = id)
28. 0.000 0.000 ↓ 0.0 0

Index Scan using kbk_pkey on kbk (cost=0.42..2.64 rows=1 width=193) (never executed)

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

Index Scan using kbk_pkey on kbk t8 (cost=0.42..2.64 rows=1 width=193) (never executed)

  • Index Cond: (account_entry.credit_kbk_id = id)
30. 0.000 0.000 ↓ 0.0 0

Index Scan using account_chart_pkey on account_chart (cost=0.43..2.65 rows=1 width=172) (never executed)

  • Index Cond: (account_entry.debet_account_id = id)
31. 0.000 0.000 ↓ 0.0 0

Index Scan using account_chart_pkey on account_chart t10 (cost=0.43..2.65 rows=1 width=172) (never executed)

  • Index Cond: (account_entry.credit_account_id = id)
32. 0.000 0.000 ↓ 0.0 0

Index Scan using kbk_kosgu_pkey on kbk_kosgu (cost=0.43..2.65 rows=1 width=186) (never executed)

  • Index Cond: (account_entry.debet_kosgu_id = id)
33. 0.000 0.000 ↓ 0.0 0

Index Scan using kbk_kosgu_pkey on kbk_kosgu t12 (cost=0.43..2.65 rows=1 width=186) (never executed)

  • Index Cond: (account_entry.credit_kosgu_id = id)
34. 0.000 0.000 ↓ 0.0 0

Index Scan using unidictrec_pkey on unidictrec (cost=0.43..2.65 rows=1 width=152) (never executed)

  • Index Cond: (account_entry.debet_kvd_analytic_id = id)
35. 0.000 0.000 ↓ 0.0 0

Index Scan using account_view_accelerator_pkey on account_view_accelerator (cost=0.42..2.64 rows=1 width=117) (never executed)

  • Index Cond: (account_entry.debet_analytic1_id = id)
36. 0.000 0.000 ↓ 0.0 0

Index Scan using unidictrec_pkey on unidictrec t15 (cost=0.43..2.65 rows=1 width=152) (never executed)

  • Index Cond: (account_entry.credit_kvd_analytic_id = id)
37. 0.000 0.000 ↓ 0.0 0

Index Scan using account_view_accelerator_pkey on account_view_accelerator t16 (cost=0.42..2.64 rows=1 width=117) (never executed)

  • Index Cond: (account_entry.credit_analytic1_id = id)
38. 0.000 0.000 ↓ 0.0 0

Index Scan using account_entry_spec_entry_id on account_entry_spec (cost=0.43..2.65 rows=1 width=52) (never executed)

  • Index Cond: (account_entry.id = entry_id)
39. 0.000 0.000 ↓ 0.0 0

Index Scan using dicts_product_pkey on dicts_product (cost=0.43..1.68 rows=1 width=221) (never executed)

  • Index Cond: (account_entry_spec.product_id = id)
40. 0.000 0.000 ↓ 0.0 0

Index Scan using account_entry_contract_second_entry_id_key on account_entry_contract (cost=0.43..2.65 rows=1 width=24) (never executed)

  • Index Cond: (account_entry.id = second_entry_id)