explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EMw9

Settings
# exclusive inclusive rows x rows loops node
1. 2.296 37.127 ↑ 13.7 3 1

GroupAggregate (cost=40.01..4,486.37 rows=41 width=677) (actual time=30.700..37.127 rows=3 loops=1)

  • Group Key: cd.subscriptionnumber, cd.servicecode
2. 2.629 34.831 ↓ 44.6 1,827 1

Nested Loop (cost=40.01..4,482.79 rows=41 width=305) (actual time=26.618..34.831 rows=1,827 loops=1)

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

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

  • Filter: (tax.rownum = 1)
4. 0.080 0.711 ↓ 1.6 19 1

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

5. 0.058 0.631 ↓ 1.6 19 1

Sort (cost=39.44..39.47 rows=12 width=227) (actual time=0.626..0.631 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 0.573 ↓ 1.6 19 1

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

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

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

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

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

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

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

10. 0.037 0.073 ↑ 1.0 116 1

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

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

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

12. 0.008 0.090 ↓ 1.3 19 1

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

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

Seq Scan on codyrep (cost=0.00..12.65 rows=15 width=81) (actual time=0.047..0.082 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. 31.483 31.483 ↓ 3.7 1,827 19

Index Scan using xif19ratedusage on ratedusage cd (cost=0.57..4,435.60 rows=488 width=97) (actual time=0.013..1.657 rows=1,827 loops=19)

  • Index Cond: ((subscriptionnumber = '20100'::numeric) AND (usagestatus = '3'::bpchar))
  • Filter: (date(usagedatetime) < CURRENT_DATE)
Planning time : 1.654 ms
Execution time : 37.850 ms