explain.depesz.com

PostgreSQL's explain analyze made readable

Result: HDW7 : Optimization for: plan #3rrJ

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 26,506.969 298,826.053 ↓ 46.6 18,000,807 1

Hash Left Join (cost=1,082.13..1,124,610.54 rows=386,094 width=1,251) (actual time=54.837..298,826.053 rows=18,000,807 loops=1)

  • Hash Cond: ((epvtsearn.peo_id = earnc.peo_id) AND (epvtsearn.ts_earn_code = earnc.pay_code))
2. 0.000 272,280.311 ↓ 48.6 18,000,807 1

Gather (cost=1,000.56..1,122,575.13 rows=370,712 width=1,250) (actual time=16.034..272,280.311 rows=18,000,807 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 8,768.688 276,235.367 ↓ 38.8 6,000,269 3 / 3

Nested Loop Left Join (cost=0.56..1,084,503.93 rows=154,463 width=1,250) (actual time=7.438..276,235.367 rows=6,000,269 loops=3)

4. 5,694.363 5,694.363 ↓ 160.6 2,698,684 3 / 3

Parallel Seq Scan on epv (cost=0.00..950,434.21 rows=16,803 width=1,239) (actual time=0.050..5,694.363 rows=2,698,684 loops=3)

  • Filter: (lower(status) = 'prnt'::text)
  • Rows Removed by Filter: 72
5. 261,772.316 261,772.316 ↓ 2.0 2 8,096,051 / 3

Index Scan using pk_epv_tsearn on epv_tsearn epvtsearn (cost=0.56..7.97 rows=1 width=23) (actual time=0.050..0.097 rows=2 loops=8,096,051)

  • Index Cond: ((epv.peo_id = peo_id) AND (epv.client_id = client_id) AND (epv.voucher_id = voucher_id))
6. 0.258 38.773 ↑ 1.0 623 1

Hash (cost=72.23..72.23 rows=623 width=18) (actual time=38.773..38.773 rows=623 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 40kB
7. 38.515 38.515 ↑ 1.0 623 1

Seq Scan on earning_codes earnc (cost=0.00..72.23 rows=623 width=18) (actual time=1.285..38.515 rows=623 loops=1)

Planning time : 1.488 ms
Execution time : 299,925.034 ms