explain.depesz.com

PostgreSQL's explain analyze made readable

Result: twtk

Settings
# exclusive inclusive rows x rows loops node
1. 2.331 31,872.649 ↑ 4.3 3 1

GroupAggregate (cost=106.00..5,591.54 rows=13 width=677) (actual time=31,864.740..31,872.649 rows=3 loops=1)

  • Group Key: cd.subscriptionnumber, cd.servicecode
2. 3.739 31,870.318 ↓ 138.3 1,798 1

Nested Loop (cost=106.00..5,590.41 rows=13 width=305) (actual time=31,859.557..31,870.318 rows=1,798 loops=1)

  • Join Filter: ((cd.servicecode = tax.servicecode) AND (cd.companynumber = tax.companynumber))
  • Rows Removed by Join Filter: 32364
3. 0.023 1.223 ↓ 19.0 19 1

Subquery Scan on tax (cost=52.74..58.38 rows=1 width=223) (actual time=1.052..1.223 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.157 1.200 ↑ 1.0 140 1

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

5. 0.260 1.043 ↑ 1.0 140 1

Sort (cost=52.74..53.09 rows=141 width=229) (actual time=1.014..1.043 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.054 0.783 ↑ 1.0 140 1

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

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

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

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

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

10. 0.029 0.062 ↑ 1.0 116 1

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

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

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

12. 0.056 0.180 ↑ 1.0 177 1

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

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

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

14. 0.037 0.105 ↑ 1.0 173 1

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

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

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

16. 30,522.949 31,865.356 ↑ 1.0 1,798 19

Bitmap Heap Scan on ratedusage cd (cost=53.26..5,504.43 rows=1,840 width=97) (actual time=75.917..1,677.124 rows=1,798 loops=19)

  • Recheck Cond: (subscriptionnumber = '20063'::numeric)
  • Heap Blocks: exact=34162
17. 1,342.407 1,342.407 ↑ 1.0 1,798 19

Bitmap Index Scan on xif5ratedusage (cost=0.00..52.80 rows=1,840 width=0) (actual time=70.653..70.653 rows=1,798 loops=19)

  • Index Cond: (subscriptionnumber = '20063'::numeric)
Planning time : 1.246 ms
Execution time : 31,873.261 ms