explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7CuR : Optimization for: plan #TOeJ

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.004 2,736.467 ↑ 1.0 1 1

Result (cost=7,987.80..7,987.81 rows=1 width=1) (actual time=2,736.467..2,736.467 rows=1 loops=1)

2.          

Initplan (forResult)

3. 0.000 2,736.463 ↓ 0.0 0 1

Nested Loop Semi Join (cost=2,277.83..47,957.60 rows=8 width=0) (actual time=2,736.463..2,736.463 rows=0 loops=1)

4. 2.015 2,736.463 ↓ 0.0 0 1

Nested Loop Semi Join (cost=2,277.25..47,898.70 rows=8 width=12) (actual time=2,736.463..2,736.463 rows=0 loops=1)

  • Join Filter: (billing_document_attrs.owner_id = billing_document_attrs_1.owner_id)
5. 1.829 1,644.546 ↓ 2.1 1,177 1

Nested Loop (cost=2,276.68..7,137.93 rows=565 width=8) (actual time=468.019..1,644.546 rows=1,177 loops=1)

6. 2.490 468.071 ↓ 2.1 1,177 1

HashAggregate (cost=2,276.11..2,281.76 rows=565 width=4) (actual time=467.199..468.071 rows=1,177 loops=1)

  • Group Key: billing_document_attrs.owner_id
7. 465.581 465.581 ↓ 2.1 1,177 1

Index Scan using ix_billing_document_attrs_name_value_int on billing_document_attrs (cost=0.70..2,274.70 rows=565 width=4) (actual time=9.255..465.581 rows=1,177 loops=1)

  • Index Cond: (((name)::text = 'crit_unique_company_id'::text) AND (value_int = 2880459))
8. 1,174.646 1,174.646 ↑ 1.0 1 1,177

Index Only Scan using billing_document_pkey on billing_document (cost=0.57..8.59 rows=1 width=4) (actual time=0.997..0.998 rows=1 loops=1,177)

  • Index Cond: (id = billing_document_attrs.owner_id)
  • Heap Fetches: 1177
9. 1,089.902 1,089.902 ↓ 0.0 0 1,177

Index Scan using ix_billing_document_attrs_owner_id on billing_document_attrs billing_document_attrs_1 (cost=0.57..72.13 rows=1 width=4) (actual time=0.926..0.926 rows=0 loops=1,177)

  • Index Cond: (owner_id = billing_document.id)
  • Filter: (((name)::text = 'crit_unique_date'::text) AND (value_date = '2019-10-03'::date))
  • Rows Removed by Filter: 7
10. 0.000 0.000 ↓ 0.0 0

Index Scan using ix_billing_document_attrs_owner_id on billing_document_attrs billing_document_attrs_2 (cost=0.57..73.35 rows=15 width=4) (never executed)

  • Index Cond: (owner_id = billing_document_attrs.owner_id)
  • Filter: (((name)::text = 'crit_unique_type'::text) AND ((value_str)::text = 'package_charge_off'::text))
Planning time : 95.325 ms
Execution time : 2,736.652 ms