explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nhmh : Segment paid sync view

Settings
# exclusive inclusive rows x rows loops node
1. 2,346.781 878,053.642 ↑ 1.0 1 1

Aggregate (cost=7,114,222.70..7,114,222.71 rows=1 width=8) (actual time=878,053.641..878,053.642 rows=1 loops=1)

2. 4,404.692 875,706.861 ↓ 2.0 10,035,213 1

Append (cost=3,256,110.37..7,051,502.66 rows=5,017,603 width=612) (actual time=732,298.902..875,706.861 rows=10,035,213 loops=1)

3. 5,037.981 737,337.554 ↓ 2.0 10,035,213 1

Seq Scan on mktsegpmmperf10mtwo seg (cost=3,256,110.37..3,464,100.55 rows=5,017,367 width=81) (actual time=732,298.900..737,337.554 rows=10,035,213 loops=1)

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

SubPlan (forSeq Scan)

5. 13.978 732,299.573 ↓ 0.0 0 1

Gather (cost=44,935.36..3,256,110.23 rows=56 width=14) (actual time=732,298.381..732,299.573 rows=0 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
6. 0.005 732,285.595 ↓ 0.0 0 3

Merge Join (cost=43,935.36..3,255,104.63 rows=23 width=14) (actual time=732,285.594..732,285.595 rows=0 loops=3)

  • Merge Cond: ((segmt.pysubjectid)::text = (mas_1.customerid)::text)
7. 1.024 1.024 ↑ 4,181,139.0 1 3

Parallel Index Only Scan using mktsegpmmperf10mtwo_pkey on mktsegpmmperf10mtwo segmt (cost=0.43..213,180.50 rows=4,181,139 width=12) (actual time=1.024..1.024 rows=1 loops=3)

  • Heap Fetches: 3
8. 732,284.566 732,284.566 ↓ 0.0 0 3

Index Scan using mkt_paidmedia_master_idx1 on mkt_paidmedia_master mas_1 (cost=0.57..4,217,698.40 rows=96 width=14) (actual time=732,284.566..732,284.566 rows=0 loops=3)

  • Index Cond: (((accounttype)::text = 'Web'::text) AND ((accountid)::text = 'webdevacc'::text))
  • Filter: (((action)::text = 'ADD'::text) AND ((status)::text = 'SUCCESS'::text) AND (upper((identifier)::text) = 'PMMPERF10MTWO'::text) AND (upper((classification)::text) = 'SEGMENT'::text))
  • Rows Removed by Filter: 10035213
9. 0.002 133,964.615 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2 (cost=3,511,891.86..3,512,140.43 rows=236 width=110) (actual time=133,964.614..133,964.615 rows=0 loops=1)

10. 0.002 133,964.613 ↓ 0.0 0 1

Nested Loop (cost=3,511,891.86..3,512,137.48 rows=236 width=82) (actual time=133,964.612..133,964.613 rows=0 loops=1)

11. 0.000 133,964.611 ↓ 0.0 0 1

HashAggregate (cost=3,511,891.29..3,511,891.69 rows=40 width=14) (actual time=133,964.611..133,964.611 rows=0 loops=1)

  • Group Key: (mastr.customerid)::text
12. 3.550 133,964.644 ↓ 0.0 0 1

Gather (cost=1,000.43..3,511,891.19 rows=40 width=14) (actual time=133,964.607..133,964.644 rows=0 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
13. 0.002 133,961.094 ↓ 0.0 0 3

Nested Loop Anti Join (cost=0.43..3,510,887.19 rows=17 width=14) (actual time=133,961.094..133,961.094 rows=0 loops=3)

14. 133,961.092 133,961.092 ↓ 0.0 0 3

Parallel Seq Scan on mkt_paidmedia_master mastr (cost=0.00..3,510,788.86 rows=40 width=14) (actual time=133,961.091..133,961.092 rows=0 loops=3)

  • Filter: (((accountid)::text = 'webdevacc'::text) AND ((accounttype)::text = 'Web'::text) AND (upper((identifier)::text) = 'PMMPERF10MTWO'::text) AND (upper((classification)::text) = 'SEGMENT'::text))
  • Rows Removed by Filter: 34271979
15. 0.000 0.000 ↓ 0.0 0

Index Only Scan using mktsegpmmperf10mtwo_pkey on mktsegpmmperf10mtwo seg_1 (cost=0.43..2.45 rows=1 width=12) (never executed)

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

Index Only Scan using mkt_paidmedia_master_idx1 on mkt_paidmedia_master mas (cost=0.57..6.08 rows=6 width=14) (never executed)

  • Index Cond: (customerid = (mastr.customerid)::text)
  • Heap Fetches: 0
Planning time : 11.030 ms
Execution time : 878,055.065 ms