explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fQlR

Settings
# exclusive inclusive rows x rows loops node
1. 2.462 130.180 ↑ 1.3 3 1

GroupAggregate (cost=105.67..5,586.57 rows=4 width=677) (actual time=120.747..130.180 rows=3 loops=1)

  • Group Key: cd.subscriptionnumber, cd.servicecode
2. 2.977 127.718 ↓ 470.2 1,881 1

Nested Loop (cost=105.67..5,586.22 rows=4 width=305) (actual time=114.957..127.718 rows=1,881 loops=1)

  • Join Filter: ((cd.servicecode = tax.servicecode) AND (cd.companynumber = tax.companynumber))
  • Rows Removed by Join Filter: 33858
3. 0.020 1.469 ↓ 19.0 19 1

Subquery Scan on tax (cost=52.74..58.38 rows=1 width=223) (actual time=1.304..1.469 rows=19 loops=1)

  • Filter: ((tax.rownum = 1) AND (tax.servicecategory = 'A'::bpchar) AND (tax.issuppressfrominvoice = '0'::bpchar))
  • Rows Removed by Filter: 121
4. 0.174 1.449 ↑ 1.0 140 1

WindowAgg (cost=52.74..55.91 rows=141 width=237) (actual time=1.268..1.449 rows=140 loops=1)

5. 0.289 1.275 ↑ 1.0 140 1

Sort (cost=52.74..53.09 rows=141 width=229) (actual time=1.254..1.275 rows=140 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: 62kB
6. 0.077 0.986 ↑ 1.0 140 1

Hash Join (cost=29.94..47.70 rows=141 width=229) (actual time=0.538..0.986 rows=140 loops=1)

  • Hash Cond: ((codyrep.dycicd = cwawrep.awcicd) AND (codyrep.dybucd = cwawrep.awbucd))
7. 0.092 0.760 ↑ 1.0 144 1

Hash Join (cost=19.62..36.61 rows=144 width=119) (actual time=0.371..0.760 rows=144 loops=1)

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

Hash Left Join (cost=5.19..19.98 rows=144 width=889) (actual time=0.107..0.431 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.005..0.020 rows=144 loops=1)

10. 0.035 0.072 ↑ 1.0 116 1

Hash (cost=3.16..3.16 rows=116 width=25) (actual time=0.072..0.072 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.007..0.037 rows=116 loops=1)

12. 0.096 0.237 ↑ 1.0 177 1

Hash (cost=11.77..11.77 rows=177 width=83) (actual time=0.237..0.237 rows=177 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 28kB
13. 0.141 0.141 ↑ 1.0 177 1

Seq Scan on codyrep (cost=0.00..11.77 rows=177 width=83) (actual time=0.008..0.141 rows=177 loops=1)

14. 0.052 0.149 ↑ 1.0 173 1

Hash (cost=7.73..7.73 rows=173 width=132) (actual time=0.149..0.149 rows=173 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 36kB
15. 0.097 0.097 ↑ 1.0 173 1

Seq Scan on cwawrep (cost=0.00..7.73 rows=173 width=132) (actual time=0.010..0.097 rows=173 loops=1)

16. 118.655 123.272 ↓ 3.4 1,881 19

Bitmap Heap Scan on ratedusage cd (cost=52.93..5,519.55 rows=553 width=97) (actual time=0.436..6.488 rows=1,881 loops=19)

  • Recheck Cond: (subscriptionnumber = '20062'::numeric)
  • Filter: ((usagestatus = '3'::bpchar) AND (date(usagedatetime) < CURRENT_DATE))
  • Heap Blocks: exact=35739
17. 4.617 4.617 ↓ 1.0 1,881 19

Bitmap Index Scan on xif5ratedusage (cost=0.00..52.79 rows=1,839 width=0) (actual time=0.243..0.243 rows=1,881 loops=19)

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