explain.depesz.com

PostgreSQL's explain analyze made readable

Result: d1ov

Settings
# exclusive inclusive rows x rows loops node
1. 0.015 531.036 ↓ 200.0 200 1

Limit (cost=5,264.51..5,264.51 rows=1 width=23) (actual time=531.010..531.036 rows=200 loops=1)

2. 4.795 531.021 ↓ 200.0 200 1

Sort (cost=5,264.51..5,264.51 rows=1 width=23) (actual time=531.008..531.021 rows=200 loops=1)

  • Sort Key: document_base.number_value, document_base.number, document_pay_doc_out.basedocumentmodel_ptr_id
  • Sort Method: top-N heapsort Memory: 49kB
3. 4.779 526.226 ↓ 10,967.0 10,967 1

Nested Loop (cost=1.59..5,264.50 rows=1 width=23) (actual time=0.228..526.226 rows=10,967 loops=1)

4. 7.947 499.513 ↓ 10,967.0 10,967 1

Nested Loop (cost=1.30..5,261.98 rows=1 width=27) (actual time=0.174..499.513 rows=10,967 loops=1)

5. 2.541 348.995 ↓ 10,967.0 10,967 1

Nested Loop (cost=0.87..5,259.75 rows=1 width=27) (actual time=0.144..348.995 rows=10,967 loops=1)

6. 0.225 0.225 ↑ 1.0 13 1

Index Scan using document_types_ent_id_7f9fb2f26c3ba828 on document_types (cost=0.43..15.55 rows=13 width=4) (actual time=0.085..0.225 rows=13 loops=1)

  • Index Cond: ((ent_id = 3,921) AND ((document_code)::text = 'pay_docs_out_document'::text))
7. 346.229 346.229 ↓ 844.0 844 13

Index Scan using document_ba_type_id_043f68_idx on document_base (cost=0.44..403.39 rows=1 width=47) (actual time=0.026..26.633 rows=844 loops=13)

  • Index Cond: ((type_id = document_types.id) AND (date_formatting <= '2020-12-31'::date) AND (date_formatting >= '2019-01-01'::date))
  • Filter: ((state <> 4) AND (ent_id = 3,921))
8. 142.571 142.571 ↑ 1.0 1 10,967

Index Scan using document_pa_basedoc_f82edc_idx on document_pay_doc_out (cost=0.43..2.23 rows=1 width=16) (actual time=0.013..0.013 rows=1 loops=10,967)

  • Index Cond: (basedocumentmodel_ptr_id = document_base.id)
9. 21.934 21.934 ↑ 1.0 1 10,967

Index Only Scan using enterprise_pkey on enterprise (cost=0.29..2.50 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=10,967)

  • Index Cond: (id = 3,921)
  • Heap Fetches: 10,967
Planning time : 1.668 ms
Execution time : 531.115 ms