explain.depesz.com

PostgreSQL's explain analyze made readable

Result: m9jn

Settings
# exclusive inclusive rows x rows loops node
1. 0.014 257,546.133 ↑ 1.8 6 1

Limit (cost=2,977,822.54..2,977,824.46 rows=11 width=360) (actual time=257,528.565..257,546.133 rows=6 loops=1)

  • WHEN ((atscorp.scjscor >= '400'::numeric) AND (atscorp.scjscor < '500'::numeric)) THEN '400 to 499'::text WHEN ((atscorp.scjscor >= '500'::numeric) AND (atscorp.scjscor < '600'::numeric)) THEN '500 to 599'::text WHEN ((atscorp.scjscor >= '600'::numeric) AND (atscorp.scjscor < '700'::numeric)) THEN '600 to 699'::text WHEN ((atscorp.scjscor >= '700'::numeric) AND (atscorp.scjscor < '800'::numeric)) THEN '700 to 799'::text WHEN (atscorp.scjscor >= '800'::numeric) THEN '800 or Above'::text ELSE 'Undefined'::text END)
  • AND (atscorp.scjscor < '800'::numeric)) THEN '6'::text WHEN (atscorp.scjscor >= '800'::numeric) THEN '7'::text ELSE '8'::text END), (CASE WHEN (atscorp.scjscor < '200'::numeric) THEN 'Below 200'::text WHEN ((atscorp.scjscor >= '200'::numeric) AND (atscorp.scjscor < '300'::numeric)) THEN '200 to 299'::text WHEN ((atscorp.scjscor >= '300'::numeric) AND (atscorp.scjscor < '400'::numeric)) THEN '300 to 399'::text WHEN ((atscorp.scjscor >= '400'::numeric) AND (atscorp.scjscor < '500'::numeric)) THEN '400 to 499'::text WHEN ((atscorp.scjscor >= '500'::numeric) AND (atscorp.scjscor < '600'::numeric)) THEN '500to 599'::text WHEN ((atscorp.scjscor >= '600'::numeric) AND (atscorp.scjscor < '700'::numeric)) THEN '600 to 699'::text WHEN ((atscorp.scjscor >= '700'::numeric) AND (atscorp.scjscor < '800'::numeric)) THEN '700 to 799'::text WHEN (atscorp.scjscor >= '800'::numeric) THEN '800 or Above'::text ELSE 'Undefined'::text END)
2. 18.897 257,546.119 ↑ 1.8 6 1

GroupAggregate (cost=2,977,822.54..2,977,824.46 rows=11 width=360) (actual time=257,528.553..257,546.119 rows=6 loops=1)

  • Group Key: (CASE WHEN (atscorp.scjscor < '200'::numeric) THEN '0'::text WHEN ((atscorp.scjscor >= '200'::numeric) AND (atscorp.scjscor < '300'::numeric)) THEN '1'::text WHEN ((atscorp.scjscor >='300'::numeric) AND (atscorp.scjscor < '400'::numeric)) THEN '2'::text WHEN ((atscorp.scjscor >= '400'::numeric) AND (atscorp.scjscor < '500'::numeric)) THEN '3'::text WHEN ((atscorp.scjscor >= '500'::numeric) AND (atscorp.scjscor < '600'::numeric)) THEN '4'::text WHEN ((atscorp.scjscor >= '600'::numeric) AND (atscorp.scjscor < '700'::numeric)) THEN '5'::text WHEN ((atscorp.scjscor >= '700'::numeric) AND(atscorp.scjscor < '800'::numeric)) THEN '6'::text WHEN (atscorp.scjscor >= '800'::numeric) THEN '7'::text ELSE '8'::text END), (CASE WHEN (atscorp.scjscor < '200'::numeric) THEN 'Below 200'::text WHEN ((atscorp.scjscor >= '200'::numeric) AND (atscorp.scjscor < '300'::numeric)) THEN '200 to 299'::text WHEN ((atscorp.scjscor >= '300'::numeric) AND (atscorp.scjscor < '400'::numeric)) THEN '300 to 399'::text
3. 17.944 257,527.222 ↓ 747.0 8,217 1

Sort (cost=2,977,822.54..2,977,822.56 rows=11 width=100) (actual time=257,526.642..257,527.222 rows=8,217 loops=1)

  • Sort Key: (CASE WHEN (atscorp.scjscor < '200'::numeric) THEN '0'::text WHEN ((atscorp.scjscor >= '200'::numeric) AND (atscorp.scjscor < '300'::numeric)) THEN '1'::text WHEN ((atscorp.scjscor >= '300'::numeric) AND (atscorp.scjscor < '400'::numeric)) THEN '2'::text WHEN ((atscorp.scjscor >= '400'::numeric) AND (atscorp.scjscor < '500'::numeric)) THEN '3'::text WHEN ((atscorp.scjscor >= '500'::numeric) AND (atscorp.scjscor < '600'::numeric)) THEN '4'::text WHEN ((atscorp.scjscor >= '600'::numeric) AND (atscorp.scjscor < '700'::numeric)) THEN '5'::text WHEN ((atscorp.scjscor >= '700'::numeric)
  • Sort Method: quicksort Memory: 1540kB
4. 12,758.573 257,509.278 ↓ 747.0 8,217 1

Gather (cost=1,001.56..2,977,822.35 rows=11 width=100) (actual time=24,651.170..257,509.278 rows=8,217 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 38.202 244,750.705 ↓ 547.8 2,739 3 / 3

Nested Loop Left Join (cost=1.56..2,976,820.83 rows=5 width=100) (actual time=18,816.534..244,750.705 rows=2,739 loops=3)

6. 13.973 244,493.383 ↓ 547.8 2,739 3 / 3

Nested Loop (cost=1.13..2,976,803.19 rows=5 width=12) (actual time=18,816.021..244,493.383 rows=2,739 loops=3)

7. 3.390 215,623.021 ↓ 398.9 3,191 3 / 3

Nested Loop (cost=0.57..2,976,770.02 rows=8 width=8) (actual time=18,783.194..215,623.021 rows=3,191 loops=3)

8. 125.773 125.773 ↓ 13.5 27 3 / 3

Parallel Seq Scan on acctpf (cost=0.00..27,495.49 rows=2 width=6) (actual time=0.100..125.773 rows=27 loops=3)

  • Filter: ((hqtrs)::text = '00594'::text)
  • Rows Removed by Filter: 223005
9. 215,493.858 215,493.858 ↑ 1.9 118 81 / 3

Index Scan using idx_auto_atreqfpx__aqinv_aqacct_aqlnam_aqfnam on atreqfpx (cost=0.57..1,474,635.05 rows=221 width=14) (actual time=6,720.554..7,981.254 rows=118 loops=81)

  • Index Cond: ((aqacct)::text = (acctpf."ACCT#")::text)
  • Filter: ((aqdstm >= '1180101'::numeric) AND (aqdstm < '1190101'::numeric))
  • Rows Removed by Filter: 3050
10. 28,856.389 28,856.389 ↑ 1.0 1 9,572 / 3

Index Scan using idx_auto_atscorp__scinv on atscorp (cost=0.56..4.14 rows=1 width=13) (actual time=9.043..9.044 rows=1 loops=9,572)

  • Index Cond: (("SCINV#")::text = (atreqfpx."AQINV#")::text)
  • Filter: ((scjscor >= '200'::numeric) AND (scjscor < '800'::numeric))
  • Rows Removed by Filter: 0
11. 219.120 219.120 ↑ 1.0 1 8,217 / 3

Index Scan using idx_looker_creditprofile__trwinv on creditprofile l_crdtrw (cost=0.43..3.45 rows=1 width=45) (actual time=0.079..0.080 rows=1 loops=8,217)

  • Index Cond: ((trwinv)::text = (atreqfpx."AQINV#")::text)