explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 281j : Optimization for: Original count star; plan #DuYx

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 206.501 916.343 ↑ 1.0 1 1

Aggregate (cost=32,551.30..32,551.31 rows=1 width=8) (actual time=916.343..916.343 rows=1 loops=1)

2. 382.898 709.842 ↓ 2.0 1,000,000 1

Append (cost=4.46..26,301.29 rows=500,001 width=612) (actual time=0.039..709.842 rows=1,000,000 loops=1)

3. 326.904 326.926 ↓ 2.0 1,000,000 1

Seq Scan on mktsegpmmperftest1mgogle seg (cost=4.46..18,794.46 rows=500,000 width=80) (actual time=0.038..326.926 rows=1,000,000 loops=1)

  • Filter: (NOT (hashed SubPlan 1))
4.          

SubPlan (forSeq Scan)

5. 0.001 0.022 ↓ 0.0 0 1

Nested Loop (cost=0.98..4.46 rows=1 width=11) (actual time=0.022..0.022 rows=0 loops=1)

6. 0.021 0.021 ↓ 0.0 0 1

Index Only Scan using mkt_paidmedia_master_identifier_idx3 on mkt_paidmedia_master mas_2 (cost=0.55..2.02 rows=1 width=11) (actual time=0.021..0.021 rows=0 loops=1)

  • Index Cond: ((identifier = 'PMMPerfTest1MGogle'::text) AND (accounttype = 'Google'::text) AND (accountid = '133-941-2293'::text) AND (action = 'ADD'::text) AND (status = 'SUCCESS'::text) AND (classification = 'SEGMENT'::text))
  • Heap Fetches: 0
7. 0.000 0.000 ↓ 0.0 0

Index Only Scan using mktsegpmmperftest1mgogle_pkey on mktsegpmmperftest1mgogle seg_1_1 (cost=0.42..2.44 rows=1 width=11) (never executed)

  • Index Cond: (pysubjectid = (mas_2.customerid)::text)
  • Heap Fetches: 0
8. 0.001 0.018 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2 (cost=4.77..6.82 rows=1 width=107) (actual time=0.018..0.018 rows=0 loops=1)

9. 0.001 0.017 ↓ 0.0 0 1

Nested Loop (cost=4.77..6.81 rows=1 width=79) (actual time=0.017..0.017 rows=0 loops=1)

10. 0.001 0.016 ↓ 0.0 0 1

HashAggregate (cost=4.35..4.36 rows=1 width=11) (actual time=0.016..0.016 rows=0 loops=1)

  • Group Key: (mas_1.customerid)::text
11. 0.001 0.015 ↓ 0.0 0 1

Nested Loop Anti Join (cost=0.85..4.34 rows=1 width=11) (actual time=0.014..0.015 rows=0 loops=1)

12. 0.014 0.014 ↓ 0.0 0 1

Index Scan using mkt_paidmedia_master_idx2 on mkt_paidmedia_master mas_1 (cost=0.42..1.89 rows=1 width=11) (actual time=0.014..0.014 rows=0 loops=1)

  • Index Cond: (((action)::text = 'REMOVE'::text) AND ((status)::text = 'FAILED'::text))
  • Filter: (((accountid)::text = '133-941-2293'::text) AND ((accounttype)::text = 'Google'::text) AND ((identifier)::text = 'PMMPerfTest1MGogle'::text) AND ((classification)::text = 'SEGMENT'::text))
13. 0.000 0.000 ↓ 0.0 0

Index Only Scan using mktsegpmmperftest1mgogle_pkey on mktsegpmmperftest1mgogle seg_1 (cost=0.42..2.44 rows=1 width=11) (never executed)

  • Index Cond: (pysubjectid = (mas_1.customerid)::text)
  • Heap Fetches: 0
14. 0.000 0.000 ↓ 0.0 0

Index Only Scan using mkt_paidmedia_master_idx1 on mkt_paidmedia_master mas (cost=0.42..2.44 rows=1 width=11) (never executed)

  • Index Cond: (customerid = (mas_1.customerid)::text)
  • Heap Fetches: 0
Planning time : 0.750 ms
Execution time : 916.462 ms