explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AYOf

Settings
# exclusive inclusive rows x rows loops node
1. 0.007 2,922.127 ↑ 1.0 1 1

Aggregate (cost=3,840.63..3,840.64 rows=1 width=8) (actual time=2,922.127..2,922.127 rows=1 loops=1)

  • Output: count(allrows.*)
  • Buffers: shared hit=187526 read=308
  • I/O Timings: read=174.542
2. 0.204 2,922.120 ↓ 40.0 40 1

Subquery Scan on allrows (cost=3,840.55..3,840.63 rows=1 width=721) (actual time=2,920.480..2,922.120 rows=40 loops=1)

  • Output: allrows.*
  • Filter: ((allrows.rank1 >= 1) AND (allrows.rank1 <= 40))
  • Rows Removed by Filter: 2202
  • Buffers: shared hit=187526 read=308
  • I/O Timings: read=174.542
3. 2.763 2,921.916 ↓ 2,242.0 2,242 1

WindowAgg (cost=3,840.55..3,840.61 rows=1 width=709) (actual time=2,920.463..2,921.916 rows=2,242 loops=1)

  • Output: last_value(xallrows.rank1) OVER (?), xallrows.cmpcod, xallrows.malseqnum, xallrows.blgsta, xallrows.csgseqnum, xallrows.seqnum, xallrows.poacod, xallrows.blgbas, xallrows.cod, xallrows.ratidf, xallrows.ratlinidr, xallrows.rattyp, xallrows.cntcod, xallrows.invnum, xallrows.csgdocnum, xallrows.valchgctr, xallrows.org, xallrows.dst, xallrows.subclsgrp, xallrows.dat, xallrows.ctgcod, xallrows.subcls, xallrows.yer, xallrows.dsn, xallrows.rsn, xallrows.hsn, xallrows.regind, xallrows.pcs, xallrows.wgt, xallrows.revgrswgt, xallrows.fltnum, xallrows.ccatyp, xallrows.ccarefnum, xallrows.srvtax, xallrows.tds, xallrows.netamt, xallrows.aplrat, xallrows.ctrcurcod, xallrows.grsamt, xallrows.revcurcod, xallrows.rmk, xallrows.mailchg, xallrows.surchg, xallrows.dclval, xallrows.dsndat, xallrows.orgcod, xallrows.dstcod, xallrows.malperflg, xallrows.untcod, xallrows.rank1, (1)
  • Buffers: shared hit=187526 read=308
  • I/O Timings: read=174.542
4. 0.497 2,919.153 ↓ 2,242.0 2,242 1

Subquery Scan on xallrows (cost=3,840.55..3,840.60 rows=1 width=701) (actual time=2,915.191..2,919.153 rows=2,242 loops=1)

  • Output: 1, xallrows.rank1, xallrows.cmpcod, xallrows.malseqnum, xallrows.blgsta, xallrows.csgseqnum, xallrows.seqnum, xallrows.poacod, xallrows.blgbas, xallrows.cod, xallrows.ratidf, xallrows.ratlinidr, xallrows.rattyp, xallrows.cntcod, xallrows.invnum, xallrows.csgdocnum, xallrows.valchgctr, xallrows.org, xallrows.dst, xallrows.subclsgrp, xallrows.dat, xallrows.ctgcod, xallrows.subcls, xallrows.yer, xallrows.dsn, xallrows.rsn, xallrows.hsn, xallrows.regind, xallrows.pcs, xallrows.wgt, xallrows.revgrswgt, xallrows.fltnum, xallrows.ccatyp, xallrows.ccarefnum, xallrows.srvtax, xallrows.tds, xallrows.netamt, xallrows.aplrat, xallrows.ctrcurcod, xallrows.grsamt, xallrows.revcurcod, xallrows.rmk, xallrows.mailchg, xallrows.surchg, xallrows.dclval, xallrows.dsndat, xallrows.orgcod, xallrows.dstcod, xallrows.malperflg, xallrows.untcod
  • Buffers: shared hit=187526 read=308
  • I/O Timings: read=174.542
5. 3.312 2,918.656 ↓ 2,242.0 2,242 1

WindowAgg (cost=3,840.55..3,840.59 rows=1 width=697) (actual time=2,915.189..2,918.656 rows=2,242 loops=1)

  • Output: result_table.cmpcod, result_table.malseqnum, result_table.blgsta, result_table.csgseqnum, result_table.seqnum, result_table.poacod, result_table.blgbas, result_table.cod, result_table.ratidf, result_table.ratlinidr, result_table.rattyp, result_table.cntcod, result_table.invnum, result_table.csgdocnum, result_table.valchgctr, result_table.org, result_table.dst, result_table.subclsgrp, result_table.dat, result_table.ctgcod, result_table.subcls, result_table.yer, result_table.dsn, result_table.rsn, result_table.hsn, result_table.regind, result_table.pcs, result_table.wgt, result_table.revgrswgt, result_table.fltnum, result_table.ccatyp, result_table.ccarefnum, result_table.srvtax, result_table.tds, result_table.netamt, result_table.aplrat, result_table.ctrcurcod, result_table.grsamt, result_table.revcurcod, result_table.rmk, result_table.mailchg, result_table.surchg, result_table.dclval, result_table.dsndat, result_table.orgcod, result_table.dstcod, result_table.malperflg, result_table.untcod, dense_rank() OVER (?)
  • Buffers: shared hit=187526 read=308
  • I/O Timings: read=174.542
6. 11.138 2,915.344 ↓ 2,242.0 2,242 1

Sort (cost=3,840.55..3,840.55 rows=1 width=689) (actual time=2,915.174..2,915.344 rows=2,242 loops=1)

  • Output: result_table.cmpcod, result_table.csgseqnum, result_table.seqnum, result_table.poacod, result_table.blgbas, result_table.invnum, result_table.csgdocnum, result_table.ccarefnum, result_table.malseqnum, result_table.blgsta, result_table.cod, result_table.ratidf, result_table.ratlinidr, result_table.rattyp, result_table.cntcod, result_table.valchgctr, result_table.org, result_table.dst, result_table.subclsgrp, result_table.dat, result_table.ctgcod, result_table.subcls, result_table.yer, result_table.dsn, result_table.rsn, result_table.hsn, result_table.regind, result_table.pcs, result_table.wgt, result_table.revgrswgt, result_table.fltnum, result_table.ccatyp, result_table.srvtax, result_table.tds, result_table.netamt, result_table.aplrat, result_table.ctrcurcod, result_table.grsamt, result_table.revcurcod, result_table.rmk, result_table.mailchg, result_table.surchg, result_table.dclval, result_table.dsndat, result_table.orgcod, result_table.dstcod, result_table.malperflg, result_table.untcod
  • Sort Key: result_table.cmpcod, result_table.blgbas, result_table.csgdocnum, result_table.csgseqnum, result_table.poacod, result_table.invnum, result_table.seqnum, result_table.ccarefnum
  • Sort Method: quicksort Memory: 865kB
  • Buffers: shared hit=187526 read=308
  • I/O Timings: read=174.542
7. 1.130 2,904.206 ↓ 2,242.0 2,242 1

Subquery Scan on result_table (cost=3,840.41..3,840.54 rows=1 width=689) (actual time=2,901.408..2,904.206 rows=2,242 loops=1)

  • Output: result_table.cmpcod, result_table.csgseqnum, result_table.seqnum, result_table.poacod, result_table.blgbas, result_table.invnum, result_table.csgdocnum, result_table.ccarefnum, result_table.malseqnum, result_table.blgsta, result_table.cod, result_table.ratidf, result_table.ratlinidr, result_table.rattyp, result_table.cntcod, result_table.valchgctr, result_table.org, result_table.dst, result_table.subclsgrp, result_table.dat, result_table.ctgcod, result_table.subcls, result_table.yer, result_table.dsn, result_table.rsn, result_table.hsn, result_table.regind, result_table.pcs, result_table.wgt, result_table.revgrswgt, result_table.fltnum, result_table.ccatyp, result_table.srvtax, result_table.tds, result_table.netamt, result_table.aplrat, result_table.ctrcurcod, result_table.grsamt, result_table.revcurcod, result_table.rmk, result_table.mailchg, result_table.surchg, result_table.dclval, result_table.dsndat, result_table.orgcod, result_table.dstcod, result_table.malperflg, result_table.untcod
  • Buffers: shared hit=187520 read=308
  • I/O Timings: read=174.542
8. 1.491 2,903.076 ↓ 2,242.0 2,242 1

Unique (cost=3,840.41..3,840.53 rows=1 width=689) (actual time=2,901.406..2,903.076 rows=2,242 loops=1)

  • Output: mst.cmpcod, mst.malseqnum, (CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN (c66dtl.blgsta)::text ELSE COALESCE((max((malmramca.blgsta)::text)), (dtl.blgsta)::text) END), mst.csgseqnum, (CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN c66dtl.invsernum ELSE dtl.sernum END), (CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN NULL::character varying ELSE mst.poacod END), mst.malidr, (CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN c66dtl.gpacod WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN malmramca.revgpacod ELSE dtl.updbiltoopoa END), dtl.blgmtxcod, dtl.ratlinidr, dtl.rattyp, NULL::text, (CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN c66dtl.invnum ELSE NULL::character varying END), mst.csgdocnum, dtl.valchgctr, mst.orgexgofc, mst.dstexgofc, subcls.subclsgrp, (CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN c66dtl.rcvdat WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN mst.rcvdat ELSE dtl.fltdat END), mst.malctgcod, mst.malsubcls, mst.yer, mst.dsn, mst.rsn, mst.hsn, mst.regind, mst.totpcs, (CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN c66dtl.totwgt WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (sum((malmramca.revgrswgt - malmramca.grswgt))) ELSE dtl.updgrswgt END), (CASE WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN ccadtl.revgrswgt ELSE NULL::numeric END), dtl.fltnum, (CASE WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (max((malmramca.mcatyp)::text)) ELSE NULL::text END), (COALESCE((max((malmramca.mcarefnum)::text)), (c66dtl.mcarefnum)::text)), dtl.srvtax, dtl.tds, (CASE WHEN (((dtl.blgsta)::text = 'BB'::text) AND (c66dtl.invnum IS NULL) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL)) THEN (dtl.netamt + (sum((malmramca.revnetamt - malmramca.netamt)))) WHEN (((dtl.blgsta)::text = 'BB'::text) AND (c66dtl.invnum IS NULL)) THEN dtl.netamt WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL) AND (((SubPlan 2)) IS NULL)) THEN ccadtl.revnetamt WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (sum((malmramca.revnetamt - malmramca.netamt))) WHEN ((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) THEN c66dtl.netamtblgcur ELSE dtl.netamt END), (CASE WHEN (((max((malmramca.mcarefnum)::text)) IS NULL) AND ((dtl.blgsta)::text = ANY ('{PB,BD}'::text[]))) THEN c66dtl.aplrat ELSE dtl.aplrat END), (CASE WHEN (((dtl.blgsta)::text = 'BB'::text) AND (c66dtl.invnum IS NULL) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL)) THEN ((max((malmramca.revctrcurcod)::text)))::character varying WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN ((max((malmramca.revctrcurcod)::text)))::character varying WHEN ((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) THEN smy.blgcurcod ELSE dtl.ctrcurcod END), (CASE WHEN (((dtl.blgsta)::text = 'BB'::text) AND (c66dtl.invnum IS NULL) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL)) THEN (dtl.updwgtchgctr + dtl.updothchgctr) WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL) AND (((SubPlan 2)) IS NULL)) THEN ccadtl.revwgtchgctr WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (sum((malmramca.revwgtchgctr - malmramca.wgtchgctr))) WHEN ((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) THEN c66dtl.totamtexcvatblgcur ELSE (dtl.updwgtchgctr + dtl.updothchgctr) END), (CASE WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (max((malmramca.revctrcurcod)::text)) ELSE NULL::text END), (CASE WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN NULL::character varying ELSE dtl.rmk END), (CASE WHEN (((dtl.blgsta)::text = 'BB'::text) AND (c66dtl.invnum IS NULL) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL)) THEN dtl.updwgtchgctr WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL) AND (((SubPlan 2)) IS NULL)) THEN ccadtl.revwgtchgctr WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (sum((malmramca.revwgtchgctr - malmramca.wgtchgctr))) WHEN ((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) THEN c66dtl.malchgblgcur ELSE dtl.updwgtchgctr END), (CASE WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (sum((malmramca.revothchgctr - malmramca.othchgctr))) ELSE dtl.updothchgctr END), mst.dclval, mst.rcvdat, mst.orgarpcod, mst.dstarpcod, mst.malperflg, mst.dspwgtunt
  • Buffers: shared hit=187520 read=308
  • I/O Timings: read=174.542
9. 3.105 2,901.585 ↓ 2,242.0 2,242 1

Sort (cost=3,840.41..3,840.41 rows=1 width=689) (actual time=2,901.405..2,901.585 rows=2,242 loops=1)

  • Output: mst.cmpcod, mst.malseqnum, (CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN (c66dtl.blgsta)::text ELSE COALESCE((max((malmramca.blgsta)::text)), (dtl.blgsta)::text) END), mst.csgseqnum, (CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN c66dtl.invsernum ELSE dtl.sernum END), (CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN NULL::character varying ELSE mst.poacod END), mst.malidr, (CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN c66dtl.gpacod WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN malmramca.revgpacod ELSE dtl.updbiltoopoa END), dtl.blgmtxcod, dtl.ratlinidr, dtl.rattyp, NULL::text, (CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN c66dtl.invnum ELSE NULL::character varying END), mst.csgdocnum, dtl.valchgctr, mst.orgexgofc, mst.dstexgofc, subcls.subclsgrp, (CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN c66dtl.rcvdat WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN mst.rcvdat ELSE dtl.fltdat END), mst.malctgcod, mst.malsubcls, mst.yer, mst.dsn, mst.rsn, mst.hsn, mst.regind, mst.totpcs, (CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN c66dtl.totwgt WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (sum((malmramca.revgrswgt - malmramca.grswgt))) ELSE dtl.updgrswgt END), (CASE WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN ccadtl.revgrswgt ELSE NULL::numeric END), dtl.fltnum, (CASE WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (max((malmramca.mcatyp)::text)) ELSE NULL::text END), (COALESCE((max((malmramca.mcarefnum)::text)), (c66dtl.mcarefnum)::text)), dtl.srvtax, dtl.tds, (CASE WHEN (((dtl.blgsta)::text = 'BB'::text) AND (c66dtl.invnum IS NULL) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL)) THEN (dtl.netamt + (sum((malmramca.revnetamt - malmramca.netamt)))) WHEN (((dtl.blgsta)::text = 'BB'::text) AND (c66dtl.invnum IS NULL)) THEN dtl.netamt WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL) AND (((SubPlan 2)) IS NULL)) THEN ccadtl.revnetamt WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (sum((malmramca.revnetamt - malmramca.netamt))) WHEN ((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) THEN c66dtl.netamtblgcur ELSE dtl.netamt END), (CASE WHEN (((max((malmramca.mcarefnum)::text)) IS NULL) AND ((dtl.blgsta)::text = ANY ('{PB,BD}'::text[]))) THEN c66dtl.aplrat ELSE dtl.aplrat END), (CASE WHEN (((dtl.blgsta)::text = 'BB'::text) AND (c66dtl.invnum IS NULL) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL)) THEN ((max((malmramca.revctrcurcod)::text)))::character varying WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN ((max((malmramca.revctrcurcod)::text)))::character varying WHEN ((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) THEN smy.blgcurcod ELSE dtl.ctrcurcod END), (CASE WHEN (((dtl.blgsta)::text = 'BB'::text) AND (c66dtl.invnum IS NULL) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL)) THEN (dtl.updwgtchgctr + dtl.updothchgctr) WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL) AND (((SubPlan 2)) IS NULL)) THEN ccadtl.revwgtchgctr WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (sum((malmramca.revwgtchgctr - malmramca.wgtchgctr))) WHEN ((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) THEN c66dtl.totamtexcvatblgcur ELSE (dtl.updwgtchgctr + dtl.updothchgctr) END), (CASE WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (max((malmramca.revctrcurcod)::text)) ELSE NULL::text END), (CASE WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN NULL::character varying ELSE dtl.rmk END), (CASE WHEN (((dtl.blgsta)::text = 'BB'::text) AND (c66dtl.invnum IS NULL) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL)) THEN dtl.updwgtchgctr WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL) AND (((SubPlan 2)) IS NULL)) THEN ccadtl.revwgtchgctr WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (sum((malmramca.revwgtchgctr - malmramca.wgtchgctr))) WHEN ((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) THEN c66dtl.malchgblgcur ELSE dtl.updwgtchgctr END), (CASE WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (sum((malmramca.revothchgctr - malmramca.othchgctr))) ELSE dtl.updothchgctr END), mst.dclval, mst.rcvdat, mst.orgarpcod, mst.dstarpcod, mst.malperflg, mst.dspwgtunt
  • Sort Key: mst.malseqnum, (CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN (c66dtl.blgsta)::text ELSE COALESCE((max((malmramca.blgsta)::text)), (dtl.blgsta)::text) END), mst.csgseqnum, (CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN c66dtl.invsernum ELSE dtl.sernum END), (CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN NULL::character varying ELSE mst.poacod END), mst.malidr, (CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN c66dtl.gpacod WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN malmramca.revgpacod ELSE dtl.updbiltoopoa END), dtl.blgmtxcod, dtl.ratlinidr, dtl.rattyp, (CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN c66dtl.invnum ELSE NULL::character varying END), mst.csgdocnum, dtl.valchgctr, mst.orgexgofc, mst.dstexgofc, subcls.subclsgrp, (CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN c66dtl.rcvdat WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN mst.rcvdat ELSE dtl.fltdat END), mst.malctgcod, mst.malsubcls, mst.yer, mst.dsn, mst.rsn, mst.hsn, mst.regind, mst.totpcs, (CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN c66dtl.totwgt WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (sum((malmramca.revgrswgt - malmramca.grswgt))) ELSE dtl.updgrswgt END), (CASE WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN ccadtl.revgrswgt ELSE NULL::numeric END), dtl.fltnum, (CASE WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (max((malmramca.mcatyp)::text)) ELSE NULL::text END), (COALESCE((max((malmramca.mcarefnum)::text)), (c66dtl.mcarefnum)::text)), dtl.srvtax, dtl.tds, (CASE WHEN (((dtl.blgsta)::text = 'BB'::text) AND (c66dtl.invnum IS NULL) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL)) THEN (dtl.netamt + (sum((malmramca.revnetamt - malmramca.netamt)))) WHEN (((dtl.blgsta)::text = 'BB'::text) AND (c66dtl.invnum IS NULL)) THEN dtl.netamt WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL) AND (((SubPlan 2)) IS NULL)) THEN ccadtl.revnetamt WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (sum((malmramca.revnetamt - malmramca.netamt))) WHEN ((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) THEN c66dtl.netamtblgcur ELSE dtl.netamt END), (CASE WHEN (((max((malmramca.mcarefnum)::text)) IS NULL) AND ((dtl.blgsta)::text = ANY ('{PB,BD}'::text[]))) THEN c66dtl.aplrat ELSE dtl.aplrat END), (CASE WHEN (((dtl.blgsta)::text = 'BB'::text) AND (c66dtl.invnum IS NULL) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL)) THEN ((max((malmramca.revctrcurcod)::text)))::character varying WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN ((max((malmramca.revctrcurcod)::text)))::character varying WHEN ((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) THEN smy.blgcurcod ELSE dtl.ctrcurcod END), (CASE WHEN (((dtl.blgsta)::text = 'BB'::text) AND (c66dtl.invnum IS NULL) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL)) THEN (dtl.updwgtchgctr + dtl.updothchgctr) WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL) AND (((SubPlan 2)) IS NULL)) THEN ccadtl.revwgtchgctr WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (sum((malmramca.revwgtchgctr - malmramca.wgtchgctr))) WHEN ((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) THEN c66dtl.totamtexcvatblgcur ELSE (dtl.updwgtchgctr + dtl.updothchgctr) END), (CASE WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (max((malmramca.revctrcurcod)::text)) ELSE NULL::text END), (CASE WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN NULL::character varying ELSE dtl.rmk END), (CASE WHEN (((dtl.blgsta)::text = 'BB'::text) AND (c66dtl.invnum IS NULL) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL)) THEN dtl.updwgtchgctr WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL) AND (((SubPlan 2)) IS NULL)) THEN ccadtl.revwgtchgctr WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (sum((malmramca.revwgtchgctr - malmramca.wgtchgctr))) WHEN ((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) THEN c66dtl.malchgblgcur ELSE dtl.updwgtchgctr END), (CASE WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (sum((malmramca.revothchgctr - malmramca.othchgctr))) ELSE dtl.updothchgctr END), mst.dclval, mst.rcvdat, mst.orgarpcod, mst.dstarpcod, mst.malperflg, mst.dspwgtunt
  • Sort Method: quicksort Memory: 865kB
  • Buffers: shared hit=187520 read=308
  • I/O Timings: read=174.542
10. 7.984 2,898.480 ↓ 2,242.0 2,242 1

Nested Loop Left Join (cost=605.38..3,840.40 rows=1 width=689) (actual time=69.234..2,898.480 rows=2,242 loops=1)

  • Output: mst.cmpcod, mst.malseqnum, CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN (c66dtl.blgsta)::text ELSE COALESCE((max((malmramca.blgsta)::text)), (dtl.blgsta)::text) END, mst.csgseqnum, CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN c66dtl.invsernum ELSE dtl.sernum END, CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN NULL::character varying ELSE mst.poacod END, mst.malidr, CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN c66dtl.gpacod WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN malmramca.revgpacod ELSE dtl.updbiltoopoa END, dtl.blgmtxcod, dtl.ratlinidr, dtl.rattyp, NULL::text, CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN c66dtl.invnum ELSE NULL::character varying END, mst.csgdocnum, dtl.valchgctr, mst.orgexgofc, mst.dstexgofc, subcls.subclsgrp, CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN c66dtl.rcvdat WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN mst.rcvdat ELSE dtl.fltdat END, mst.malctgcod, mst.malsubcls, mst.yer, mst.dsn, mst.rsn, mst.hsn, mst.regind, mst.totpcs, CASE WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NULL)) THEN c66dtl.totwgt WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (sum((malmramca.revgrswgt - malmramca.grswgt))) ELSE dtl.updgrswgt END, CASE WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN ccadtl.revgrswgt ELSE NULL::numeric END, dtl.fltnum, CASE WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (max((malmramca.mcatyp)::text)) ELSE NULL::text END, COALESCE((max((malmramca.mcarefnum)::text)), (c66dtl.mcarefnum)::text), dtl.srvtax, dtl.tds, CASE WHEN (((dtl.blgsta)::text = 'BB'::text) AND (c66dtl.invnum IS NULL) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL)) THEN (dtl.netamt + (sum((malmramca.revnetamt - malmramca.netamt)))) WHEN (((dtl.blgsta)::text = 'BB'::text) AND (c66dtl.invnum IS NULL)) THEN dtl.netamt WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL) AND (((SubPlan 2)) IS NULL)) THEN ccadtl.revnetamt WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (sum((malmramca.revnetamt - malmramca.netamt))) WHEN ((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) THEN c66dtl.netamtblgcur ELSE dtl.netamt END, CASE WHEN (((max((malmramca.mcarefnum)::text)) IS NULL) AND ((dtl.blgsta)::text = ANY ('{PB,BD}'::text[]))) THEN c66dtl.aplrat ELSE dtl.aplrat END, CASE WHEN (((dtl.blgsta)::text = 'BB'::text) AND (c66dtl.invnum IS NULL) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL)) THEN ((max((malmramca.revctrcurcod)::text)))::character varying WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN ((max((malmramca.revctrcurcod)::text)))::character varying WHEN ((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) THEN smy.blgcurcod ELSE dtl.ctrcurcod END, CASE WHEN (((dtl.blgsta)::text = 'BB'::text) AND (c66dtl.invnum IS NULL) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL)) THEN (dtl.updwgtchgctr + dtl.updothchgctr) WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL) AND (((SubPlan 2)) IS NULL)) THEN ccadtl.revwgtchgctr WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (sum((malmramca.revwgtchgctr - malmramca.wgtchgctr))) WHEN ((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) THEN c66dtl.totamtexcvatblgcur ELSE (dtl.updwgtchgctr + dtl.updothchgctr) END, CASE WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (max((malmramca.revctrcurcod)::text)) ELSE NULL::text END, CASE WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN NULL::character varying ELSE dtl.rmk END, CASE WHEN (((dtl.blgsta)::text = 'BB'::text) AND (c66dtl.invnum IS NULL) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL)) THEN dtl.updwgtchgctr WHEN (((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) AND ((max((malmramca.mcarefnum)::text)) IS NOT NULL) AND (((SubPlan 2)) IS NULL)) THEN ccadtl.revwgtchgctr WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (sum((malmramca.revwgtchgctr - malmramca.wgtchgctr))) WHEN ((dtl.blgsta)::text = ANY ('{PB,BD}'::text[])) THEN c66dtl.malchgblgcur ELSE dtl.updwgtchgctr END, CASE WHEN ((max((malmramca.mcarefnum)::text)) IS NOT NULL) THEN (sum((malmramca.revothchgctr - malmramca.othchgctr))) ELSE dtl.updothchgctr END, mst.dclval, mst.rcvdat, mst.orgarpcod, mst.dstarpcod, mst.malperflg, mst.dspwgtunt
  • Inner Unique: true
  • Join Filter: (((malmramca.cmpcod)::text = (ccadtl.cmpcod)::text) AND (malmramca.malseqnum = ccadtl.malseqnum) AND ((max((malmramca.mcarefnum)::text)) = (ccadtl.mcarefnum)::text))
  • Buffers: shared hit=187517 read=308
  • I/O Timings: read=174.542
11. 44.230 2,890.496 ↓ 2,242.0 2,242 1

Nested Loop Left Join (cost=605.25..3,831.95 rows=1 width=1,229) (actual time=69.205..2,890.496 rows=2,242 loops=1)

  • Output: mst.cmpcod, mst.malseqnum, mst.csgseqnum, mst.poacod, mst.malidr, mst.csgdocnum, mst.orgexgofc, mst.dstexgofc, mst.rcvdat, mst.malctgcod, mst.malsubcls, mst.yer, mst.dsn, mst.rsn, mst.hsn, mst.regind, mst.totpcs, mst.dclval, mst.orgarpcod, mst.dstarpcod, mst.malperflg, mst.dspwgtunt, dtl.blgsta, dtl.sernum, dtl.updbiltoopoa, dtl.blgmtxcod, dtl.ratlinidr, dtl.rattyp, dtl.valchgctr, dtl.fltdat, dtl.updgrswgt, dtl.fltnum, dtl.srvtax, dtl.tds, dtl.netamt, dtl.aplrat, dtl.ctrcurcod, dtl.updwgtchgctr, dtl.updothchgctr, dtl.rmk, subcls.subclsgrp, c66dtl.blgsta, c66dtl.invsernum, c66dtl.gpacod, c66dtl.invnum, c66dtl.rcvdat, c66dtl.totwgt, c66dtl.mcarefnum, c66dtl.netamtblgcur, c66dtl.aplrat, c66dtl.totamtexcvatblgcur, c66dtl.malchgblgcur, smy.blgcurcod, (max((malmramca.mcarefnum)::text)), (max((malmramca.blgsta)::text)), malmramca.revgpacod, (sum((malmramca.revgrswgt - malmramca.grswgt))), (max((malmramca.mcatyp)::text)), (sum((malmramca.revnetamt - malmramca.netamt))), ((SubPlan 2)), (max((malmramca.revctrcurcod)::text)), (sum((malmramca.revwgtchgctr - malmramca.wgtchgctr))), (sum((malmramca.revwgtchgctr - malmramca.wgtchgctr))), (sum((malmramca.revothchgctr - malmramca.othchgctr))), malmramca.cmpcod, malmramca.malseqnum
  • Join Filter: (((mst.cmpcod)::text = (malmramca.cmpcod)::text) AND (mst.malseqnum = malmramca.malseqnum))
  • Rows Removed by Join Filter: 266679
  • Buffers: shared hit=185275 read=308
  • I/O Timings: read=174.542
12. 1.878 2,687.084 ↓ 2,242.0 2,242 1

Nested Loop Left Join (cost=0.70..3,227.28 rows=1 width=841) (actual time=21.754..2,687.084 rows=2,242 loops=1)

  • Output: mst.cmpcod, mst.malseqnum, mst.csgseqnum, mst.poacod, mst.malidr, mst.csgdocnum, mst.orgexgofc, mst.dstexgofc, mst.rcvdat, mst.malctgcod, mst.malsubcls, mst.yer, mst.dsn, mst.rsn, mst.hsn, mst.regind, mst.totpcs, mst.dclval, mst.orgarpcod, mst.dstarpcod, mst.malperflg, mst.dspwgtunt, dtl.blgsta, dtl.sernum, dtl.updbiltoopoa, dtl.blgmtxcod, dtl.ratlinidr, dtl.rattyp, dtl.valchgctr, dtl.fltdat, dtl.updgrswgt, dtl.fltnum, dtl.srvtax, dtl.tds, dtl.netamt, dtl.aplrat, dtl.ctrcurcod, dtl.updwgtchgctr, dtl.updothchgctr, dtl.rmk, subcls.subclsgrp, c66dtl.blgsta, c66dtl.invsernum, c66dtl.gpacod, c66dtl.invnum, c66dtl.rcvdat, c66dtl.totwgt, c66dtl.mcarefnum, c66dtl.netamtblgcur, c66dtl.aplrat, c66dtl.totamtexcvatblgcur, c66dtl.malchgblgcur, smy.blgcurcod
  • Inner Unique: true
  • Join Filter: (((smy.cmpcod)::text = (c66dtl.cmpcod)::text) AND (c66dtl.invsernum = smy.invsernum) AND ((smy.invnum)::text = (c66dtl.invnum)::text) AND ((smy.gpacod)::text = (c66dtl.gpacod)::text))
  • Rows Removed by Join Filter: 15237
  • Buffers: shared hit=184956 read=265
  • I/O Timings: read=129.686
13. 2.156 2,680.722 ↓ 2,242.0 2,242 1

Nested Loop Left Join (cost=0.70..3,226.17 rows=1 width=828) (actual time=20.761..2,680.722 rows=2,242 loops=1)

  • Output: mst.cmpcod, mst.malseqnum, mst.csgseqnum, mst.poacod, mst.malidr, mst.csgdocnum, mst.orgexgofc, mst.dstexgofc, mst.rcvdat, mst.malctgcod, mst.malsubcls, mst.yer, mst.dsn, mst.rsn, mst.hsn, mst.regind, mst.totpcs, mst.dclval, mst.orgarpcod, mst.dstarpcod, mst.malperflg, mst.dspwgtunt, dtl.blgsta, dtl.sernum, dtl.updbiltoopoa, dtl.blgmtxcod, dtl.ratlinidr, dtl.rattyp, dtl.valchgctr, dtl.fltdat, dtl.updgrswgt, dtl.fltnum, dtl.srvtax, dtl.tds, dtl.netamt, dtl.aplrat, dtl.ctrcurcod, dtl.updwgtchgctr, dtl.updothchgctr, dtl.rmk, subcls.subclsgrp, c66dtl.blgsta, c66dtl.invsernum, c66dtl.gpacod, c66dtl.invnum, c66dtl.rcvdat, c66dtl.totwgt, c66dtl.mcarefnum, c66dtl.netamtblgcur, c66dtl.aplrat, c66dtl.totamtexcvatblgcur, c66dtl.malchgblgcur, c66dtl.cmpcod
  • Buffers: shared hit=182715 read=264
  • I/O Timings: read=128.704
14. 508.542 2,658.388 ↓ 2,242.0 2,242 1

Nested Loop (cost=0.55..3,222.53 rows=1 width=723) (actual time=19.698..2,658.388 rows=2,242 loops=1)

  • Output: mst.cmpcod, mst.malseqnum, mst.csgseqnum, mst.poacod, mst.malidr, mst.csgdocnum, mst.orgexgofc, mst.dstexgofc, mst.rcvdat, mst.malctgcod, mst.malsubcls, mst.yer, mst.dsn, mst.rsn, mst.hsn, mst.regind, mst.totpcs, mst.dclval, mst.orgarpcod, mst.dstarpcod, mst.malperflg, mst.dspwgtunt, dtl.blgsta, dtl.sernum, dtl.updbiltoopoa, dtl.blgmtxcod, dtl.ratlinidr, dtl.rattyp, dtl.valchgctr, dtl.fltdat, dtl.updgrswgt, dtl.fltnum, dtl.srvtax, dtl.tds, dtl.netamt, dtl.aplrat, dtl.ctrcurcod, dtl.updwgtchgctr, dtl.updothchgctr, dtl.rmk, subcls.subclsgrp
  • Join Filter: ((mst.dstexgofc)::text = (doe.exgofccod)::text)
  • Rows Removed by Join Filter: 5996033
  • Buffers: shared hit=180236 read=263
  • I/O Timings: read=127.670
15. 509.118 1,467.736 ↓ 2,385.0 2,385 1

Nested Loop (cost=0.55..3,125.66 rows=1 width=723) (actual time=14.344..1,467.736 rows=2,385 loops=1)

  • Output: mst.cmpcod, mst.malseqnum, mst.csgseqnum, mst.poacod, mst.malidr, mst.csgdocnum, mst.orgexgofc, mst.dstexgofc, mst.rcvdat, mst.malctgcod, mst.malsubcls, mst.yer, mst.dsn, mst.rsn, mst.hsn, mst.regind, mst.totpcs, mst.dclval, mst.orgarpcod, mst.dstarpcod, mst.malperflg, mst.dspwgtunt, dtl.blgsta, dtl.sernum, dtl.updbiltoopoa, dtl.blgmtxcod, dtl.ratlinidr, dtl.rattyp, dtl.valchgctr, dtl.fltdat, dtl.updgrswgt, dtl.fltnum, dtl.srvtax, dtl.tds, dtl.netamt, dtl.aplrat, dtl.ctrcurcod, dtl.updwgtchgctr, dtl.updothchgctr, dtl.rmk, subcls.subclsgrp
  • Join Filter: ((mst.orgexgofc)::text = (ooe.exgofccod)::text)
  • Rows Removed by Join Filter: 6016010
  • Buffers: shared hit=99175 read=234
  • I/O Timings: read=123.796
16. 11.882 271.827 ↓ 2,393.0 2,393 1

Nested Loop (cost=0.55..3,028.78 rows=1 width=723) (actual time=7.470..271.827 rows=2,393 loops=1)

  • Output: mst.cmpcod, mst.malseqnum, mst.csgseqnum, mst.poacod, mst.malidr, mst.csgdocnum, mst.orgexgofc, mst.dstexgofc, mst.rcvdat, mst.malctgcod, mst.malsubcls, mst.yer, mst.dsn, mst.rsn, mst.hsn, mst.regind, mst.totpcs, mst.dclval, mst.orgarpcod, mst.dstarpcod, mst.malperflg, mst.dspwgtunt, dtl.blgsta, dtl.sernum, dtl.updbiltoopoa, dtl.blgmtxcod, dtl.ratlinidr, dtl.rattyp, dtl.valchgctr, dtl.fltdat, dtl.updgrswgt, dtl.fltnum, dtl.srvtax, dtl.tds, dtl.netamt, dtl.aplrat, dtl.ctrcurcod, dtl.updwgtchgctr, dtl.updothchgctr, dtl.rmk, subcls.subclsgrp
  • Inner Unique: true
  • Join Filter: ((mst.malsubcls)::text = (subcls.subclscod)::text)
  • Rows Removed by Join Filter: 122681
  • Buffers: shared hit=17818 read=229
  • I/O Timings: read=116.999
17. 68.881 244.609 ↓ 2,556.0 2,556 1

Nested Loop (cost=0.55..3,025.81 rows=1 width=720) (actual time=6.744..244.609 rows=2,556 loops=1)

  • Output: mst.cmpcod, mst.malseqnum, mst.csgseqnum, mst.poacod, mst.malidr, mst.csgdocnum, mst.orgexgofc, mst.dstexgofc, mst.rcvdat, mst.malctgcod, mst.malsubcls, mst.yer, mst.dsn, mst.rsn, mst.hsn, mst.regind, mst.totpcs, mst.dclval, mst.orgarpcod, mst.dstarpcod, mst.malperflg, mst.dspwgtunt, dtl.blgsta, dtl.sernum, dtl.updbiltoopoa, dtl.blgmtxcod, dtl.ratlinidr, dtl.rattyp, dtl.valchgctr, dtl.fltdat, dtl.updgrswgt, dtl.fltnum, dtl.srvtax, dtl.tds, dtl.netamt, dtl.aplrat, dtl.ctrcurcod, dtl.updwgtchgctr, dtl.updothchgctr, dtl.rmk
  • Join Filter: ((to_number((to_char(mst.rcvdat, 'YYYYMMDD'::text))::character varying) >= to_number((to_char(poa.vldfrm, 'YYYYMMDD'::text))::character varying)) AND (to_number((to_char(mst.rcvdat, 'YYYYMMDD'::text))::character varying) <= to_number((to_char(poa.vldtoo, 'YYYYMMDD'::text))::character varying)))
  • Buffers: shared hit=15263 read=228
  • I/O Timings: read=116.293
18. 4.680 160.392 ↓ 196.6 2,556 1

Nested Loop (cost=0.28..3,008.41 rows=13 width=723) (actual time=3.773..160.392 rows=2,556 loops=1)

  • Output: mst.cmpcod, mst.malseqnum, mst.csgseqnum, mst.poacod, mst.malidr, mst.csgdocnum, mst.orgexgofc, mst.dstexgofc, mst.rcvdat, mst.malctgcod, mst.malsubcls, mst.yer, mst.dsn, mst.rsn, mst.hsn, mst.regind, mst.totpcs, mst.dclval, mst.orgarpcod, mst.dstarpcod, mst.malperflg, mst.dspwgtunt, dtl.blgsta, dtl.sernum, dtl.updbiltoopoa, dtl.blgmtxcod, dtl.ratlinidr, dtl.rattyp, dtl.valchgctr, dtl.fltdat, dtl.updgrswgt, dtl.fltnum, dtl.srvtax, dtl.tds, dtl.netamt, dtl.aplrat, dtl.ctrcurcod, dtl.updwgtchgctr, dtl.updothchgctr, dtl.rmk, dtl.cmpcod
  • Inner Unique: true
  • Buffers: shared hit=7603 read=220
  • I/O Timings: read=108.833
19. 12.464 12.464 ↑ 1.0 2,558 1

Seq Scan on icopgmapp.malmragpablgdtl dtl (cost=0.00..153.97 rows=2,558 width=615) (actual time=1.348..12.464 rows=2,558 loops=1)

  • Output: dtl.cmpcod, dtl.malseqnum, dtl.sernum, dtl.secfrm, dtl.sectoo, dtl.fltdat, dtl.fltcaridr, dtl.fltnum, dtl.fltcarcod, dtl.fltseqnum, dtl.segsernum, dtl.aplrat, dtl.grswgt, dtl.updgrswgt, dtl.biltoopoa, dtl.updbiltoopoa, dtl.wgtchgctr, dtl.wgtchgusd, dtl.wgtchgxdr, dtl.wgtchgbas, dtl.updwgtchgctr, dtl.updwgtchgusd, dtl.updwgtchgxdr, dtl.updwgtchgbas, dtl.blgsta, dtl.ctrcurcod, dtl.updctrcurcod, dtl.rmk, dtl.duepoa, dtl.acctxnidr, dtl.fulchg, dtl.ratind, dtl.srvtax, dtl.tds, dtl.netamt, dtl.ratincsrvtaxflg, dtl.untcod, dtl.valchgctr, dtl.ratlinidr, dtl.blgmtxcod, dtl.othchgctr, dtl.othchgbas, dtl.othchgusd, dtl.othchgxdr, dtl.updothchgctr, dtl.updothchgbas, dtl.updothchgusd, dtl.updothchgxdr, dtl.rattyp, dtl.lstupdusr, dtl.lstupdtim, dtl.tagidx, dtl.uspratonectr, dtl.uspchgonectr, dtl.usprattwoctr, dtl.uspchgtwoctr, dtl.uspratthrctr, dtl.uspchgthrctr, dtl.uspratforctr, dtl.uspchgforctr, dtl.uspratfivctr, dtl.uspchgfivctr, dtl.condisrat, dtl.disincamt, dtl.incamt, dtl.updnetamt, dtl.incrmk
  • Filter: ((dtl.cmpcod)::text = 'AA'::text)
  • Buffers: shared read=122
  • I/O Timings: read=9.542
20. 143.248 143.248 ↑ 1.0 1 2,558

Index Scan using malmrablgmst_pk on icopgmapp.malmrablgmst mst (cost=0.28..1.12 rows=1 width=115) (actual time=0.056..0.056 rows=1 loops=2,558)

  • Output: mst.cmpcod, mst.malseqnum, mst.malidr, mst.csgdocnum, mst.csgseqnum, mst.poacod, mst.uldnum, mst.orgarpcod, mst.dstarpcod, mst.orgctycod, mst.dstctycod, mst.orgexgofc, mst.dstexgofc, mst.malctgcod, mst.malsubcls, mst.rsn, mst.dsn, mst.hsn, mst.yer, mst.regind, mst.rou, mst.totpcs, mst.grswgt, mst.mrasta, mst.rcvdat, mst.fstfltdat, mst.poaflg, mst.trfcarcod, mst.domintflg, mst.dclval, mst.curcod, mst.malcmpcod, mst.lstupdusr, mst.lstupdtim, mst.tagidx, mst.malsrvlvl, mst.srvrspln, mst.malsrc, mst.scnwvdflg, mst.malperflg, mst.dspwgt, mst.dspwgtunt, mst.formjrsta
  • Index Cond: ((mst.malseqnum = dtl.malseqnum) AND ((mst.cmpcod)::text = 'AA'::text))
  • Filter: ((to_number((to_char(mst.rcvdat, 'YYYYMMDD'::text))::character varying) >= '20190201'::numeric) AND (to_number((to_char(mst.rcvdat, 'YYYYMMDD'::text))::character varying) <= '20200213'::numeric))
  • Rows Removed by Filter: 0
  • Buffers: shared hit=7603 read=98
  • I/O Timings: read=99.292
21. 15.336 15.336 ↑ 1.0 1 2,556

Index Scan using malpoadtl_pk on icopgmapp.malpoadtl poa (cost=0.27..0.31 rows=1 width=25) (actual time=0.006..0.006 rows=1 loops=2,556)

  • Output: poa.cmpcod, poa.poacod, poa.parcod, poa.sernum, poa.blgsrc, poa.blgfrq, poa.stlcur, poa.vldfrm, poa.vldtoo, poa.parval, poa.dtlrmk, poa.partyp, poa.ptyidr, poa.tagidx
  • Index Cond: (((poa.cmpcod)::text = 'AA'::text) AND ((poa.poacod)::text = (dtl.updbiltoopoa)::text) AND ((poa.parcod)::text = 'STLINFO'::text))
  • Buffers: shared hit=7660 read=8
  • I/O Timings: read=7.460
22. 15.336 15.336 ↑ 1.6 49 2,556

Seq Scan on icopgmapp.malsubclsmst subcls (cost=0.00..1.99 rows=79 width=9) (actual time=0.001..0.006 rows=49 loops=2,556)

  • Output: subcls.cmpcod, subcls.subclscod, subcls.des, subcls.subclsgrp, subcls.lstupdtim, subcls.lstupdusr, subcls.tagidx
  • Filter: ((subcls.cmpcod)::text = 'AA'::text)
  • Buffers: shared hit=2555 read=1
  • I/O Timings: read=0.706
23. 686.791 686.791 ↑ 1.0 2,515 2,393

Seq Scan on icopgmapp.malexgofcmst ooe (cost=0.00..65.44 rows=2,515 width=10) (actual time=0.001..0.287 rows=2,515 loops=2,393)

  • Output: ooe.cmpcod, ooe.exgofccod, ooe.actflg, ooe.ctycod, ooe.exgcoddes, ooe.cntcod, ooe.ofccod, ooe.poacod, ooe.lstupdtim, ooe.lstupdusr, ooe.arpcod, ooe.malboxidr, ooe.tagidx
  • Filter: ((ooe.cmpcod)::text = 'AA'::text)
  • Buffers: shared hit=81357 read=5
  • I/O Timings: read=6.797
24. 682.110 682.110 ↑ 1.0 2,515 2,385

Seq Scan on icopgmapp.malexgofcmst doe (cost=0.00..65.44 rows=2,515 width=10) (actual time=0.001..0.286 rows=2,515 loops=2,385)

  • Output: doe.cmpcod, doe.exgofccod, doe.actflg, doe.ctycod, doe.exgcoddes, doe.cntcod, doe.ofccod, doe.poacod, doe.lstupdtim, doe.lstupdusr, doe.arpcod, doe.malboxidr, doe.tagidx
  • Filter: ((doe.cmpcod)::text = 'AA'::text)
  • Buffers: shared hit=81061 read=29
  • I/O Timings: read=3.874
25. 19.821 20.178 ↓ 0.0 0 2,242

Index Scan using malmragpac66dtl_pk on icopgmapp.malmragpac66dtl c66dtl (cost=0.14..3.63 rows=1 width=112) (actual time=0.009..0.009 rows=0 loops=2,242)

  • Output: c66dtl.cmpcod, c66dtl.gpacod, c66dtl.invnum, c66dtl.invsernum, c66dtl.malseqnum, c66dtl.rcvdat, c66dtl.orgcod, c66dtl.dstcod, c66dtl.malctgcod, c66dtl.subclsgrp, c66dtl.totpcs, c66dtl.totwgt, c66dtl.untcod, c66dtl.rsn, c66dtl.dsn, c66dtl.rmk, c66dtl.bilsecfrm, c66dtl.bilsectoo, c66dtl.fltcarcod, c66dtl.fltcaridr, c66dtl.fltnum, c66dtl.fltdat, c66dtl.aplrat, c66dtl.blgsta, c66dtl.mcarefnum, c66dtl.acctxnidr, c66dtl.accsta, c66dtl.bldamtblgcur, c66dtl.actsubcls, c66dtl.fulchg, c66dtl.ratind, c66dtl.csgpoacod, c66dtl.ctrcurcod, c66dtl.blgcurcod, c66dtl.vatamtblgcur, c66dtl.totamtexcvatblgcur, c66dtl.srvtaxblgcur, c66dtl.tdsblgcur, c66dtl.netamtblgcur, c66dtl.valchgblgcur, c66dtl.domflg, c66dtl.othchgblgcur, c66dtl.malchgblgcur, c66dtl.intfcdflg, c66dtl.intfcdtim, c66dtl.blgmtxcod, c66dtl.ratlinidr, c66dtl.rattyp, c66dtl.lstupdtim, c66dtl.lstupdusr, c66dtl.tagidx, c66dtl.exgratctr, c66dtl.exgratbas, c66dtl.stlsta, c66dtl.stlamt, c66dtl.dueamt, c66dtl.casclsflg
  • Index Cond: ((mst.malseqnum = c66dtl.malseqnum) AND ((mst.cmpcod)::text = (c66dtl.cmpcod)::text) AND ((c66dtl.cmpcod)::text = 'AA'::text))
  • Filter: (((c66dtl.blgsta)::text <> 'WD'::text) AND (c66dtl.invsernum = (SubPlan 1)))
  • Buffers: shared hit=2479 read=1
  • I/O Timings: read=1.034
26.          

SubPlan (for Index Scan)

27. 0.119 0.357 ↑ 1.0 1 119

Aggregate (cost=1.14..1.15 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=119)

  • Output: max(malmragpac51smy.invsernum)
  • Buffers: shared hit=119
28. 0.238 0.238 ↑ 1.0 1 119

Seq Scan on icopgmapp.malmragpac51smy (cost=0.00..1.14 rows=1 width=12) (actual time=0.002..0.002 rows=1 loops=119)

  • Output: malmragpac51smy.cmpcod, malmragpac51smy.gpacod, malmragpac51smy.invnum, malmragpac51smy.invsernum, malmragpac51smy.blgdat, malmragpac51smy.ctrcurcod, malmragpac51smy.blgcurcod, malmragpac51smy.blgprdfrm, malmragpac51smy.blgprdtoo, malmragpac51smy.stlamt, malmragpac51smy.totamtctrcur, malmragpac51smy.totamtblgcur, malmragpac51smy.totamtbascur, malmragpac51smy.totamtlcblgcur, malmragpac51smy.totamtcpblgcur, malmragpac51smy.totamtemsblgcur, malmragpac51smy.totamtsvsblgcur, malmragpac51smy.stlsta, malmragpac51smy.invsta, malmragpac51smy.vatnum, malmragpac51smy.totvatamtblgcur, malmragpac51smy.totvatamtbascur, malmragpac51smy.amtexcvat, malmragpac51smy.dueamt, malmragpac51smy.emlsntflg, malmragpac51smy.invrefnum, malmragpac51smy.domflg, malmragpac51smy.netvalchgblgcur, malmragpac51smy.gibidr, malmragpac51smy.invdat, malmragpac51smy.invgenusr, malmragpac51smy.invprtdat, malmragpac51smy.lstupdusr, malmragpac51smy.lstupdtim, malmragpac51smy.tagidx, malmragpac51smy.intfcdfilnam, malmragpac51smy.intfcdtim, malmragpac51smy.rblinvnum
  • Filter: (((malmragpac51smy.cmpcod)::text = (c66dtl.cmpcod)::text) AND ((malmragpac51smy.invnum)::text = (c66dtl.invnum)::text) AND ((malmragpac51smy.gpacod)::text = (c66dtl.gpacod)::text) AND ((malmragpac51smy.invsta)::text = 'F'::text))
  • Rows Removed by Filter: 6
  • Buffers: shared hit=119
29. 4.484 4.484 ↓ 7.0 7 2,242

Seq Scan on icopgmapp.malmragpac51smy smy (cost=0.00..1.09 rows=1 width=134) (actual time=0.001..0.002 rows=7 loops=2,242)

  • Output: smy.cmpcod, smy.gpacod, smy.invnum, smy.invsernum, smy.blgdat, smy.ctrcurcod, smy.blgcurcod, smy.blgprdfrm, smy.blgprdtoo, smy.stlamt, smy.totamtctrcur, smy.totamtblgcur, smy.totamtbascur, smy.totamtlcblgcur, smy.totamtcpblgcur, smy.totamtemsblgcur, smy.totamtsvsblgcur, smy.stlsta, smy.invsta, smy.vatnum, smy.totvatamtblgcur, smy.totvatamtbascur, smy.amtexcvat, smy.dueamt, smy.emlsntflg, smy.invrefnum, smy.domflg, smy.netvalchgblgcur, smy.gibidr, smy.invdat, smy.invgenusr, smy.invprtdat, smy.lstupdusr, smy.lstupdtim, smy.tagidx, smy.intfcdfilnam, smy.intfcdtim, smy.rblinvnum
  • Filter: ((smy.cmpcod)::text = 'AA'::text)
  • Buffers: shared hit=2241 read=1
  • I/O Timings: read=0.982
30. 96.406 159.182 ↓ 59.5 119 2,242

Unique (cost=604.55..604.62 rows=2 width=420) (actual time=0.021..0.071 rows=119 loops=2,242)

  • Output: malmramca.cmpcod, malmramca.malseqnum, malmramca.revgpacod, (max((malmramca.mcarefnum)::text)), (max((malmramca.blgsta)::text)), (max(malmramca.revgrswgt)), (max((malmramca.mcatyp)::text)), (sum((malmramca.revnetamt - malmramca.netamt))), (sum((malmramca.revwgtchgctr - malmramca.wgtchgctr))), (max((malmramca.revctrcurcod)::text)), (sum((malmramca.revwgtchgctr - malmramca.wgtchgctr))), (sum((malmramca.revothchgctr - malmramca.othchgctr))), (sum((malmramca.revgrswgt - malmramca.grswgt))), ((SubPlan 2))
  • Buffers: shared hit=319 read=43
  • I/O Timings: read=44.856
31. 15.562 62.776 ↓ 59.5 119 2,242

Sort (cost=604.55..604.55 rows=2 width=420) (actual time=0.021..0.028 rows=119 loops=2,242)

  • Output: malmramca.cmpcod, malmramca.malseqnum, malmramca.revgpacod, (max((malmramca.mcarefnum)::text)), (max((malmramca.blgsta)::text)), (max(malmramca.revgrswgt)), (max((malmramca.mcatyp)::text)), (sum((malmramca.revnetamt - malmramca.netamt))), (sum((malmramca.revwgtchgctr - malmramca.wgtchgctr))), (max((malmramca.revctrcurcod)::text)), (sum((malmramca.revwgtchgctr - malmramca.wgtchgctr))), (sum((malmramca.revothchgctr - malmramca.othchgctr))), (sum((malmramca.revgrswgt - malmramca.grswgt))), ((SubPlan 2))
  • Sort Key: malmramca.cmpcod, malmramca.malseqnum, malmramca.revgpacod, (max((malmramca.mcarefnum)::text)), (max((malmramca.blgsta)::text)), (max(malmramca.revgrswgt)), (max((malmramca.mcatyp)::text)), (sum((malmramca.revnetamt - malmramca.netamt))), (sum((malmramca.revwgtchgctr - malmramca.wgtchgctr))), (max((malmramca.revctrcurcod)::text)), (sum((malmramca.revwgtchgctr - malmramca.wgtchgctr))), (sum((malmramca.revothchgctr - malmramca.othchgctr))), (sum((malmramca.revgrswgt - malmramca.grswgt))), ((SubPlan 2))
  • Sort Method: quicksort Memory: 34kB
  • Buffers: shared hit=319 read=43
  • I/O Timings: read=44.856
32. 0.017 47.214 ↓ 59.5 119 1

Append (cost=17.55..604.54 rows=2 width=420) (actual time=1.450..47.214 rows=119 loops=1)

  • Buffers: shared hit=319 read=43
  • I/O Timings: read=44.856
33. 0.001 0.021 ↓ 0.0 0 1

GroupAggregate (cost=17.55..22.03 rows=1 width=420) (actual time=0.021..0.021 rows=0 loops=1)

  • Output: malmramca.cmpcod, malmramca.malseqnum, malmramca.revgpacod, max((malmramca.mcarefnum)::text), max((malmramca.blgsta)::text), max(malmramca.revgrswgt), max((malmramca.mcatyp)::text), sum((malmramca.revnetamt - malmramca.netamt)), sum((malmramca.revwgtchgctr - malmramca.wgtchgctr)), max((malmramca.revctrcurcod)::text), sum((malmramca.revwgtchgctr - malmramca.wgtchgctr)), sum((malmramca.revothchgctr - malmramca.othchgctr)), sum((malmramca.revgrswgt - malmramca.grswgt)), (SubPlan 2)
  • Group Key: malmramca.cmpcod, malmramca.malseqnum, malmramca.revgpacod
  • Buffers: shared hit=1
34. 0.009 0.020 ↓ 0.0 0 1

Sort (cost=17.55..17.56 rows=1 width=300) (actual time=0.020..0.020 rows=0 loops=1)

  • Output: malmramca.cmpcod, malmramca.malseqnum, malmramca.revgpacod, malmramca.mcarefnum, malmramca.blgsta, malmramca.revgrswgt, malmramca.mcatyp, malmramca.revnetamt, malmramca.netamt, malmramca.revwgtchgctr, malmramca.wgtchgctr, malmramca.revctrcurcod, malmramca.revothchgctr, malmramca.othchgctr, malmramca.grswgt
  • Sort Key: malmramca.malseqnum, malmramca.revgpacod
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=1
35. 0.001 0.011 ↓ 0.0 0 1

Nested Loop (cost=0.42..17.54 rows=1 width=300) (actual time=0.011..0.011 rows=0 loops=1)

  • Output: malmramca.cmpcod, malmramca.malseqnum, malmramca.revgpacod, malmramca.mcarefnum, malmramca.blgsta, malmramca.revgrswgt, malmramca.mcatyp, malmramca.revnetamt, malmramca.netamt, malmramca.revwgtchgctr, malmramca.wgtchgctr, malmramca.revctrcurcod, malmramca.revothchgctr, malmramca.othchgctr, malmramca.grswgt
  • Inner Unique: true
  • Buffers: shared hit=1
36. 0.010 0.010 ↓ 0.0 0 1

Index Scan using malmramca_ind1 on icopgmapp.malmramca (cost=0.14..8.16 rows=1 width=300) (actual time=0.010..0.010 rows=0 loops=1)

  • Output: malmramca.cmpcod, malmramca.malseqnum, malmramca.mcarefnum, malmramca.issdat, malmramca.bilprdfrm, malmramca.bilprdtoo, malmramca.mcatyp, malmramca.mcarmk, malmramca.grswgt, malmramca.revgrswgt, malmramca.wgtchgctr, malmramca.revwgtchgctr, malmramca.duearl, malmramca.revduearl, malmramca.duepstdbt, malmramca.revduepstdbt, malmramca.gpacod, malmramca.revgpacod, malmramca.gpanam, malmramca.revgpanam, malmramca.secfrm, malmramca.sectoo, malmramca.ctrcurcod, malmramca.revctrcurcod, malmramca.autoratflg, malmramca.srvtax, malmramca.revsrvtax, malmramca.tds, malmramca.revtds, malmramca.netamt, malmramca.revnetamt, malmramca.othchgctr, malmramca.revothchgctr, malmramca.grswgtind, malmramca.wgtchgind, malmramca.gpachgind, malmramca.curchgind, malmramca.blgsta, malmramca.mcasta, malmramca.lstupdtim, malmramca.lstupdusr, malmramca.tagidx, malmramca.autmca, malmramca.rat, malmramca.revrat, malmramca.ratchgind, malmramca.mcarsncod
  • Index Cond: (((malmramca.mcatyp)::text = 'A'::text) AND ((malmramca.mcasta)::text = 'A'::text))
  • Filter: (((malmramca.cmpcod)::text = 'AA'::text) AND ((malmramca.blgsta)::text = ANY ('{BB,OH,WD}'::text[])))
  • Buffers: shared hit=1
37. 0.000 0.000 ↓ 0.0 0

Index Scan using malmrablgmst_pk on icopgmapp.malmrablgmst (cost=0.28..8.81 rows=1 width=10) (never executed)

  • Output: malmrablgmst.cmpcod, malmrablgmst.malseqnum, malmrablgmst.malidr, malmrablgmst.csgdocnum, malmrablgmst.csgseqnum, malmrablgmst.poacod, malmrablgmst.uldnum, malmrablgmst.orgarpcod, malmrablgmst.dstarpcod, malmrablgmst.orgctycod, malmrablgmst.dstctycod, malmrablgmst.orgexgofc, malmrablgmst.dstexgofc, malmrablgmst.malctgcod, malmrablgmst.malsubcls, malmrablgmst.rsn, malmrablgmst.dsn, malmrablgmst.hsn, malmrablgmst.yer, malmrablgmst.regind, malmrablgmst.rou, malmrablgmst.totpcs, malmrablgmst.grswgt, malmrablgmst.mrasta, malmrablgmst.rcvdat, malmrablgmst.fstfltdat, malmrablgmst.poaflg, malmrablgmst.trfcarcod, malmrablgmst.domintflg, malmrablgmst.dclval, malmrablgmst.curcod, malmrablgmst.malcmpcod, malmrablgmst.lstupdusr, malmrablgmst.lstupdtim, malmrablgmst.tagidx, malmrablgmst.malsrvlvl, malmrablgmst.srvrspln, malmrablgmst.malsrc, malmrablgmst.scnwvdflg, malmrablgmst.malperflg, malmrablgmst.dspwgt, malmrablgmst.dspwgtunt, malmrablgmst.formjrsta
  • Index Cond: ((malmrablgmst.malseqnum = malmramca.malseqnum) AND ((malmrablgmst.cmpcod)::text = 'AA'::text))
  • Filter: ((to_number((to_char(malmrablgmst.rcvdat, 'YYYYMMDD'::text))::character varying) >= '20190201'::numeric) AND (to_number((to_char(malmrablgmst.rcvdat, 'YYYYMMDD'::text))::character varying) <= '20200213'::numeric))
38.          

SubPlan (for GroupAggregate)

39. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.14..4.40 rows=1 width=32) (never executed)

  • Output: 'Y'::text
40. 0.000 0.000 ↓ 0.0 0

Index Only Scan using malmragpac66dtl_pk on icopgmapp.malmragpac66dtl (cost=0.14..4.40 rows=1 width=32) (never executed)

  • Output: 'Y'::text
  • Index Cond: ((malmragpac66dtl.gpacod = (malmramca.revgpacod)::text) AND (malmragpac66dtl.malseqnum = malmramca.malseqnum) AND (malmragpac66dtl.cmpcod = (malmramca.cmpcod)::text))
  • Heap Fetches: 0
41. 0.146 47.176 ↓ 119.0 119 1

Nested Loop (cost=0.28..582.48 rows=1 width=368) (actual time=1.429..47.176 rows=119 loops=1)

  • Output: c66dtl_1.cmpcod, c66dtl_1.malseqnum, c66dtl_1.gpacod, NULL::text, NULL::text, NULL::numeric, NULL::text, NULL::numeric, NULL::numeric, NULL::text, NULL::numeric, NULL::numeric, NULL::numeric, NULL::text
  • Inner Unique: true
  • Buffers: shared hit=318 read=43
  • I/O Timings: read=44.856
42. 5.261 5.261 ↑ 1.0 119 1

Seq Scan on icopgmapp.malmragpac66dtl c66dtl_1 (cost=0.00..5.49 rows=119 width=16) (actual time=0.663..5.261 rows=119 loops=1)

  • Output: c66dtl_1.cmpcod, c66dtl_1.gpacod, c66dtl_1.invnum, c66dtl_1.invsernum, c66dtl_1.malseqnum, c66dtl_1.rcvdat, c66dtl_1.orgcod, c66dtl_1.dstcod, c66dtl_1.malctgcod, c66dtl_1.subclsgrp, c66dtl_1.totpcs, c66dtl_1.totwgt, c66dtl_1.untcod, c66dtl_1.rsn, c66dtl_1.dsn, c66dtl_1.rmk, c66dtl_1.bilsecfrm, c66dtl_1.bilsectoo, c66dtl_1.fltcarcod, c66dtl_1.fltcaridr, c66dtl_1.fltnum, c66dtl_1.fltdat, c66dtl_1.aplrat, c66dtl_1.blgsta, c66dtl_1.mcarefnum, c66dtl_1.acctxnidr, c66dtl_1.accsta, c66dtl_1.bldamtblgcur, c66dtl_1.actsubcls, c66dtl_1.fulchg, c66dtl_1.ratind, c66dtl_1.csgpoacod, c66dtl_1.ctrcurcod, c66dtl_1.blgcurcod, c66dtl_1.vatamtblgcur, c66dtl_1.totamtexcvatblgcur, c66dtl_1.srvtaxblgcur, c66dtl_1.tdsblgcur, c66dtl_1.netamtblgcur, c66dtl_1.valchgblgcur, c66dtl_1.domflg, c66dtl_1.othchgblgcur, c66dtl_1.malchgblgcur, c66dtl_1.intfcdflg, c66dtl_1.intfcdtim, c66dtl_1.blgmtxcod, c66dtl_1.ratlinidr, c66dtl_1.rattyp, c66dtl_1.lstupdtim, c66dtl_1.lstupdusr, c66dtl_1.tagidx, c66dtl_1.exgratctr, c66dtl_1.exgratbas, c66dtl_1.stlsta, c66dtl_1.stlamt, c66dtl_1.dueamt, c66dtl_1.casclsflg
  • Filter: ((c66dtl_1.cmpcod)::text = 'AA'::text)
  • Buffers: shared read=4
  • I/O Timings: read=5.225
43. 41.769 41.769 ↑ 1.0 1 119

Index Scan using malmrablgmst_pk on icopgmapp.malmrablgmst mst_1 (cost=0.28..4.85 rows=1 width=10) (actual time=0.351..0.351 rows=1 loops=119)

  • Output: mst_1.cmpcod, mst_1.malseqnum, mst_1.malidr, mst_1.csgdocnum, mst_1.csgseqnum, mst_1.poacod, mst_1.uldnum, mst_1.orgarpcod, mst_1.dstarpcod, mst_1.orgctycod, mst_1.dstctycod, mst_1.orgexgofc, mst_1.dstexgofc, mst_1.malctgcod, mst_1.malsubcls, mst_1.rsn, mst_1.dsn, mst_1.hsn, mst_1.yer, mst_1.regind, mst_1.rou, mst_1.totpcs, mst_1.grswgt, mst_1.mrasta, mst_1.rcvdat, mst_1.fstfltdat, mst_1.poaflg, mst_1.trfcarcod, mst_1.domintflg, mst_1.dclval, mst_1.curcod, mst_1.malcmpcod, mst_1.lstupdusr, mst_1.lstupdtim, mst_1.tagidx, mst_1.malsrvlvl, mst_1.srvrspln, mst_1.malsrc, mst_1.scnwvdflg, mst_1.malperflg, mst_1.dspwgt, mst_1.dspwgtunt, mst_1.formjrsta
  • Index Cond: ((mst_1.malseqnum = c66dtl_1.malseqnum) AND ((mst_1.cmpcod)::text = 'AA'::text))
  • Filter: ((to_number((to_char(mst_1.rcvdat, 'YYYYMMDD'::text))::character varying) >= '20190201'::numeric) AND (to_number((to_char(mst_1.rcvdat, 'YYYYMMDD'::text))::character varying) <= '20200213'::numeric))
  • Buffers: shared hit=318 read=39
  • I/O Timings: read=39.631
44. 0.000 0.000 ↓ 0.0 0 2,242

Index Scan using malmramca_pk on icopgmapp.malmramca ccadtl (cost=0.14..8.37 rows=1 width=142) (actual time=0.000..0.000 rows=0 loops=2,242)

  • Output: ccadtl.cmpcod, ccadtl.malseqnum, ccadtl.mcarefnum, ccadtl.issdat, ccadtl.bilprdfrm, ccadtl.bilprdtoo, ccadtl.mcatyp, ccadtl.mcarmk, ccadtl.grswgt, ccadtl.revgrswgt, ccadtl.wgtchgctr, ccadtl.revwgtchgctr, ccadtl.duearl, ccadtl.revduearl, ccadtl.duepstdbt, ccadtl.revduepstdbt, ccadtl.gpacod, ccadtl.revgpacod, ccadtl.gpanam, ccadtl.revgpanam, ccadtl.secfrm, ccadtl.sectoo, ccadtl.ctrcurcod, ccadtl.revctrcurcod, ccadtl.autoratflg, ccadtl.srvtax, ccadtl.revsrvtax, ccadtl.tds, ccadtl.revtds, ccadtl.netamt, ccadtl.revnetamt, ccadtl.othchgctr, ccadtl.revothchgctr, ccadtl.grswgtind, ccadtl.wgtchgind, ccadtl.gpachgind, ccadtl.curchgind, ccadtl.blgsta, ccadtl.mcasta, ccadtl.lstupdtim, ccadtl.lstupdusr, ccadtl.tagidx, ccadtl.autmca, ccadtl.rat, ccadtl.revrat, ccadtl.ratchgind, ccadtl.mcarsncod
  • Index Cond: ((ccadtl.cmpcod)::text = 'AA'::text)
  • Buffers: shared hit=2242
Planning time : 104.959 ms
Execution time : 2,923.015 ms