explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ohnx : Optimization for: plan #liDp

Settings

Optimization path:

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

Sort (cost=346,432.39..346,434.73 rows=937 width=1,114) (actual rows= loops=)

  • Sort Key: inventory.parent_device_id, inventory.item_type DESC
2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=345,962.69..346,386.14 rows=937 width=1,114) (actual rows= loops=)

  • Join Filter: ((inventory.as_on_date)::text = ("ANY_subquery".as_on_date)::text)
3. 0.000 0.000 ↓ 0.0

HashAggregate (cost=345,962.26..345,962.27 rows=1 width=11) (actual rows= loops=)

  • Group Key: ("ANY_subquery".as_on_date)::text
4. 0.000 0.000 ↓ 0.0

Subquery Scan on ANY_subquery (cost=345,962.24..345,962.26 rows=1 width=11) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

HashAggregate (cost=345,962.24..345,962.25 rows=1 width=11) (actual rows= loops=)

  • Group Key: inventory_1.as_on_date
6. 0.000 0.000 ↓ 0.0

Seq Scan on inventory inventory_1 (cost=0.00..341,469.39 rows=1,797,139 width=11) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Index Scan using idx_inventory_customer_key on inventory (cost=0.43..412.15 rows=937 width=1,125) (actual rows= loops=)

  • Index Cond: ((customer_key)::text = 'PSS_308071-2051410'::text)