explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5Had

Settings
# exclusive inclusive rows x rows loops node
1. 2.399 53,502.047 ↑ 41.0 3 1

GroupAggregate (cost=95.68..5,620.94 rows=123 width=677) (actual time=53,493.409..53,502.047 rows=3 loops=1)

  • Group Key: cd.subscriptionnumber, cd.servicecode
2. 4.073 53,499.648 ↓ 14.9 1,827 1

Nested Loop (cost=95.68..5,610.18 rows=123 width=305) (actual time=53,487.681..53,499.648 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 0.790 ↓ 19.0 19 1

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

  • Filter: (tax.rownum = 1)
4. 0.081 0.780 ↓ 1.6 19 1

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

5. 0.057 0.699 ↓ 1.6 19 1

Sort (cost=39.44..39.47 rows=12 width=227) (actual time=0.686..0.699 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.025 0.642 ↓ 1.6 19 1

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

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

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

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

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

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

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

10. 0.035 0.070 ↑ 1.0 116 1

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

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

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

12. 0.024 0.160 ↓ 1.3 19 1

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

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

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

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

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

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

Bitmap Heap Scan on ratedusage cd (cost=56.24..5,548.17 rows=1,477 width=97) (actual time=16.827..2,815.515 rows=1,827 loops=19)

  • Recheck Cond: (subscriptionnumber = '20100'::numeric)
  • Filter: ((usagestatus = '3'::bpchar) AND (usagedatetime < CURRENT_DATE))
  • Heap Blocks: exact=34713
16. 263.188 263.188 ↑ 1.0 1,827 19

Bitmap Index Scan on xif5ratedusage (cost=0.00..55.87 rows=1,849 width=0) (actual time=13.852..13.852 rows=1,827 loops=19)

  • Index Cond: (subscriptionnumber = '20100'::numeric)