vbainbridge
16th June 2005, 16:34
Hi!
The following is a select statement found in a BaanERP DLL. A client has done some research and found the performance on the select to be very poor. They are using level 2 drivers on an Informix database. Can anyone suggest on how to improve the statement?
select whinh220.lsta, whinh225.pkdf,
whinh225.oorg, whinh225.orno, whinh225.oset,
whinh225.pono, whinh225.seqn, whinh225.sern,
whinh225.cwar, whinh225.loca, whinh225.item,
whinh225.clot, whinh225.idat,
whinh200.sfty, whinh200.stty, whinh200.sfco
from whinh200, whinh220, whinh225
where whinh225._index2 = {:whinr140.cwar,:whinr140.loca,
:whinr140.item,:whinr140.clot,
:whinr140.idat}
and whinh225.cmbd refers to whinh220
and whinh225.shpc = tcyesno.yes
and whinh225.loct = " "
and whinh220.lsta <> whinh.lstb.shipped
and whinh200._index1 = {whinh225.oorg,
whinh225.orno,
whinh225.oset}
and whinh225.oorg <> whinh.oorg.production and whinh225.oorg <> whinh.oorg.production.man and whinh225.oorg <> whinh.oorg.assembly and not (not (whinh220.oorg = whinh.oorg.assembly) and whinh200.sfty = whinh.type.warehouse and whinh200.stty = whinh.type.warehouse and whinh200.sfco = whinh200.stco) and not (not (whinh220.oorg = whinh.oorg.assembly) and whinh200.sfty = whinh.type.work.center and whinh200.stty = whinh.type.work.center)
order by whinh225.cwar, whinh225.loca, whinh225.item,
whinh225.clot, whinh225.idat,
whinh225.oorg, whinh225.orno, whinh225.oset,
whinh225.pono, whinh225.seqn
Thanks!
The following is a select statement found in a BaanERP DLL. A client has done some research and found the performance on the select to be very poor. They are using level 2 drivers on an Informix database. Can anyone suggest on how to improve the statement?
select whinh220.lsta, whinh225.pkdf,
whinh225.oorg, whinh225.orno, whinh225.oset,
whinh225.pono, whinh225.seqn, whinh225.sern,
whinh225.cwar, whinh225.loca, whinh225.item,
whinh225.clot, whinh225.idat,
whinh200.sfty, whinh200.stty, whinh200.sfco
from whinh200, whinh220, whinh225
where whinh225._index2 = {:whinr140.cwar,:whinr140.loca,
:whinr140.item,:whinr140.clot,
:whinr140.idat}
and whinh225.cmbd refers to whinh220
and whinh225.shpc = tcyesno.yes
and whinh225.loct = " "
and whinh220.lsta <> whinh.lstb.shipped
and whinh200._index1 = {whinh225.oorg,
whinh225.orno,
whinh225.oset}
and whinh225.oorg <> whinh.oorg.production and whinh225.oorg <> whinh.oorg.production.man and whinh225.oorg <> whinh.oorg.assembly and not (not (whinh220.oorg = whinh.oorg.assembly) and whinh200.sfty = whinh.type.warehouse and whinh200.stty = whinh.type.warehouse and whinh200.sfco = whinh200.stco) and not (not (whinh220.oorg = whinh.oorg.assembly) and whinh200.sfty = whinh.type.work.center and whinh200.stty = whinh.type.work.center)
order by whinh225.cwar, whinh225.loca, whinh225.item,
whinh225.clot, whinh225.idat,
whinh225.oorg, whinh225.orno, whinh225.oset,
whinh225.pono, whinh225.seqn
Thanks!