explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cgho

Settings
# exclusive inclusive rows x rows loops node
1. 2.391 98,003.228 ↑ 40.7 3 1

GroupAggregate (cost=40.01..4,500.79 rows=122 width=677) (actual time=97,997.129..98,003.228 rows=3 loops=1)

  • Group Key: cd.subscriptionnumber, cd.servicecode
2. 5.239 98,000.837 ↓ 15.0 1,827 1

Nested Loop (cost=40.01..4,490.12 rows=122 width=305) (actual time=97,993.439..98,000.837 rows=1,827 loops=1)

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

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

  • Filter: (tax.rownum = 1)
4. 0.156 21.798 ↓ 1.6 19 1

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

5. 0.089 21.642 ↓ 1.6 19 1

Sort (cost=39.44..39.47 rows=12 width=227) (actual time=21.626..21.642 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.029 21.553 ↓ 1.6 19 1

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

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

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

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

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

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

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

10. 0.065 0.122 ↑ 1.0 116 1

Hash (cost=3.16..3.16 rows=116 width=25) (actual time=0.121..0.122 rows=116 loops=1)

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

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

12. 0.009 0.149 ↓ 1.3 19 1

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

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

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

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

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

  • Index Cond: ((awcicd = coeirep.eicicd) AND (awbucd = coeirep.eibucd))
15. 97,973.785 97,973.785 ↓ 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=35.603..5,156.515 rows=1,827 loops=19)

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