explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4nVF

Settings
# exclusive inclusive rows x rows loops node
1. 2.582 43.558 ↑ 40.7 3 1

GroupAggregate (cost=40.01..4,500.79 rows=122 width=677) (actual time=36.158..43.558 rows=3 loops=1)

  • Group Key: cd.subscriptionnumber, cd.servicecode
2. 2.818 40.976 ↓ 15.0 1,827 1

Nested Loop (cost=40.01..4,490.12 rows=122 width=305) (actual time=29.244..40.976 rows=1,827 loops=1)

  • Join Filter: ((cd.servicecode = tax.servicecode) AND (cd.companynumber = tax.companynumber))
  • Rows Removed by Join Filter: 32886
3. 0.010 1.697 ↓ 19.0 19 1

Subquery Scan on tax (cost=39.44..39.86 rows=1 width=223) (actual time=0.689..1.697 rows=19 loops=1)

  • Filter: (tax.rownum = 1)
4. 1.006 1.687 ↓ 1.6 19 1

WindowAgg (cost=39.44..39.71 rows=12 width=243) (actual time=0.689..1.687 rows=19 loops=1)

5. 0.052 0.681 ↓ 1.6 19 1

Sort (cost=39.44..39.47 rows=12 width=227) (actual time=0.670..0.681 rows=19 loops=1)

  • Sort Key: coeirep.eibucd, coeirep.eicicd, (CASE WHEN (coeirep.eibfdt = '0'::numeric) THEN NULL::date WHEN (coeirep.eibfdt = '9999999'::numeric) THEN '9999-12-31'::date ELSE (((((substr(((('19000000'::numeric + coeirep.eibfdt))::character varying)::text, 1, 4) || '-'::text) || substr(((('19000000'::numeric + coeirep.eibfdt))::character varying)::text, 5, 2)) || '-'::text) || substr(((('19000000'::numeric + coeirep.eibfdt))::character varying)::text, 7, 2)))::date END) DESC
  • Sort Method: quicksort Memory: 30kB
6. 0.017 0.629 ↓ 1.6 19 1

Nested Loop (cost=18.21..39.23 rows=12 width=227) (actual time=0.319..0.629 rows=19 loops=1)

  • Join Filter: ((codyrep.dycicd = cwawrep.awcicd) AND (codyrep.dybucd = cwawrep.awbucd))
7. 0.046 0.536 ↓ 1.6 19 1

Hash Join (cost=18.07..35.07 rows=12 width=117) (actual time=0.292..0.536 rows=19 loops=1)

  • Hash Cond: ((coeirep.eicicd = codyrep.dycicd) AND (coeirep.eibucd = codyrep.dybucd))
8. 0.273 0.362 ↑ 1.0 144 1

Hash Left Join (cost=5.19..19.98 rows=144 width=889) (actual time=0.102..0.362 rows=144 loops=1)

  • Hash Cond: ((coeirep.eicicd = cfa9rep.a9cicd) AND (coeirep.eibucd = cfa9rep.a9bucd) AND (coeirep.eibfdt = cfa9rep.a9bfdt))
9. 0.020 0.020 ↑ 1.0 144 1

Seq Scan on coeirep (cost=0.00..6.44 rows=144 width=32) (actual time=0.009..0.020 rows=144 loops=1)

10. 0.032 0.069 ↑ 1.0 116 1

Hash (cost=3.16..3.16 rows=116 width=25) (actual time=0.068..0.069 rows=116 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
11. 0.037 0.037 ↑ 1.0 116 1

Seq Scan on cfa9rep (cost=0.00..3.16 rows=116 width=25) (actual time=0.006..0.037 rows=116 loops=1)

12. 0.006 0.128 ↓ 1.3 19 1

Hash (cost=12.65..12.65 rows=15 width=81) (actual time=0.128..0.128 rows=19 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
13. 0.122 0.122 ↓ 1.3 19 1

Seq Scan on codyrep (cost=0.00..12.65 rows=15 width=81) (actual time=0.072..0.122 rows=19 loops=1)

  • Filter: ((dyewna = 'A'::bpchar) AND (dyecsv = '0'::bpchar))
  • Rows Removed by Filter: 158
14. 0.076 0.076 ↑ 1.0 1 19

Index Scan using xpkservice_extension on cwawrep (cost=0.14..0.33 rows=1 width=132) (actual time=0.004..0.004 rows=1 loops=19)

  • Index Cond: ((awcicd = coeirep.eicicd) AND (awbucd = coeirep.eibucd))
15. 36.461 36.461 ↓ 1.2 1,827 19

Index Scan using xif19ratedusage on ratedusage cd (cost=0.57..4,428.28 rows=1,465 width=97) (actual time=0.016..1.919 rows=1,827 loops=19)

  • Index Cond: ((subscriptionnumber = '20100'::numeric) AND (usagestatus = '3'::bpchar) AND (usagedatetime < CURRENT_DATE))