explain.depesz.com

PostgreSQL's explain analyze made readable

Result: B5Ie

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 265,349.878 ↑ 1.0 1 1

Unique (cost=172.20..172.21 rows=1 width=4) (actual time=265,349.876..265,349.878 rows=1 loops=1)

2. 0.037 265,349.876 ↓ 7.0 7 1

Sort (cost=172.20..172.21 rows=1 width=4) (actual time=265,349.875..265,349.876 rows=7 loops=1)

  • Sort Key: account_analytic.index
  • Sort Method: quicksort Memory: 25kB
3. 0.036 265,349.839 ↓ 7.0 7 1

Nested Loop (cost=165.19..172.19 rows=1 width=4) (actual time=265,276.322..265,349.839 rows=7 loops=1)

4. 11.097 265,282.193 ↓ 5.0 10 1

Unique (cost=164.76..164.77 rows=2 width=4) (actual time=265,261.604..265,282.193 rows=10 loops=1)

5. 102.838 265,271.096 ↓ 84,653.5 169,307 1

Sort (cost=164.76..164.77 rows=2 width=4) (actual time=265,261.597..265,271.096 rows=169,307 loops=1)

  • Sort Key: u0.credit_account_id
  • Sort Method: quicksort Memory: 14077kB
6. 85.292 265,168.258 ↓ 84,653.5 169,307 1

Nested Loop (cost=1.00..164.75 rows=2 width=4) (actual time=73.055..265,168.258 rows=169,307 loops=1)

7. 39.526 39.526 ↑ 1.0 8 1

Index Scan using document_types_ent_id_7f9fb2f26c3ba828 on document_types u1 (cost=0.43..10.14 rows=8 width=4) (actual time=15.927..39.526 rows=8 loops=1)

  • Index Cond: ((ent_id = 4813) AND ((document_code)::text = 'mz_document'::text))
8. 265,043.440 265,043.440 ↓ 1,322.7 21,163 8

Index Scan using account_ent_documen_139b09_idx on account_entry u0 (cost=0.57..19.17 rows=16 width=8) (actual time=12.918..33,130.430 rows=21,163 loops=8)

  • Index Cond: ((document_type_id = u1.id) AND (ent_id = 4813))
9. 67.610 67.610 ↑ 1.0 1 10

Index Scan using account_analytic_account_id on account_analytic (cost=0.43..3.69 rows=1 width=8) (actual time=6.761..6.761 rows=1 loops=10)

  • Index Cond: (account_id = u0.credit_account_id)
  • Filter: ((begin <= '2020-02-04'::date) AND ("end" > '2020-02-04'::date) AND ((dict_code)::text = 'MOLPack'::text) AND (state = ANY ('{0,1,2}'::integer[])))
  • Rows Removed by Filter: 0
Planning time : 7.295 ms
Execution time : 265,351.349 ms