Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2106

Re: Speeding up run time

$
0
0

I know I wrote a reply to this, but it doesn't seem to have posted.

 

The first thing I see is that you're connecting to Oracle but not using the Native Oracle connection that is available in Crystal.  It tends to be faster than using OLEDB or ODBC.

 

The next thing I would do is delete the table(s) and the conditions in the Select Expert in the subreport where your last query above is located and replace it with a command that looks like this:

 

SELECT RULEJ.JOB_NO, RULEJ.URULE_CODE, RULEJ.RULEJ_VAL, RULEJ.RULEJ_TEXT

FROM LEGO.RULEJ RULEJ

WHERE RULEJ.JOB_NO={?JobNo} AND

  RULEJ.URULE_CODE in ('Bag_fold','Bag_HolPun','Bag_ODID','Bag_Zipper','BagGussizi','BagGusSizm','BagHedSeal',

'BagLipsizi','BagLipSizm','BagPrnTB','BagTearNot','BagWicket1','BagWicket2','Box_Size',

'eCore_Info','eGauge','eRepeat','FGBagLen','FGBaglen_i','FGBagwid_i','FGBagWidth','FGFTPerRol',

'FGImpRoll','FGKGRoll','FGlbRoll','FGM_PerRol','FGSQINRoll','inAcross','LamCons_1','LamCons_2',

'nAcross','nBagCart','nColors','NofCentCut','nUp','Seal_Side0','Slit_WidtB','Slit_Width','SW_varianc',

'WgtPerBoxP','WidCentCut')

 

You'll need to create the {?JobNo} parameter in the Command Editor for this to work.  You then take the field that you're using to link the main report to the subreport and in the bottom left of the linking screen, select the {?JobNo} parameter after you move the field to the top right of the screen.  See here for more information about working with commands:  Best Practices When Using Commands with Crystal Reports.  If the RULEJ table has a single index that contains both the JOB_NO field and the URULE_CODE field, you can also add the /*+ index(RULEJ <index name>) */ hint after the word "Select" in the query.  This will force Oracle to use that index to speed up the query.

 

There might be other tuning you can do to the queries, but you would need to work with your DBA on that.

 

-Dell

 



Viewing all articles
Browse latest Browse all 2106

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>