explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Baow : Optimization for: plan #ecak

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 17.819 117.666 ↑ 4.7 18,383 1

Nested Loop (cost=40.09..386,502.66 rows=87,070 width=7) (actual time=0.130..117.666 rows=18,383 loops=1)

2. 2.537 46.663 ↑ 7.7 26,592 1

Nested Loop (cost=39.66..268,433.85 rows=204,845 width=11) (actual time=0.066..46.663 rows=26,592 loops=1)

3. 0.284 0.320 ↑ 7.1 147 1

Bitmap Heap Scan on enterprise u0 (cost=39.10..1,890.31 rows=1,042 width=4) (actual time=0.053..0.320 rows=147 loops=1)

  • Recheck Cond: ((lft >= 6170) AND (lft <= 6463))
  • Filter: (tree_id = 8)
  • Heap Blocks: exact=141
4. 0.036 0.036 ↑ 7.1 147 1

Bitmap Index Scan on enterprise_lft (cost=0.00..38.84 rows=1,042 width=0) (actual time=0.036..0.036 rows=147 loops=1)

  • Index Cond: ((lft >= 6170) AND (lft <= 6463))
5. 43.806 43.806 ↑ 1.1 181 147

Index Scan using document_base_ent_id_date_formatting_f1cc9952_idx on document_base (cost=0.56..253.83 rows=197 width=19) (actual time=0.010..0.298 rows=181 loops=147)

  • Index Cond: ((ent_id = u0.id) AND (date_formatting >= '2019-01-01'::date) AND (date_formatting <= '2019-12-31'::date))
  • Filter: ((document_storno_id IS NULL) AND (number ~ '[0-9]+'::text))
  • Rows Removed by Filter: 1
6. 53.184 53.184 ↑ 1.0 1 26,592

Index Only Scan using document_pay_doc_out_is_template_id on document_pay_doc_out (cost=0.43..0.57 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=26,592)

  • Index Cond: ((basedocumentmodel_ptr_id = document_base.id) AND (is_template = false))
  • Filter: (NOT is_template)
  • Heap Fetches: 12518