Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reports running faster

Status
Not open for further replies.

kfr104

Programmer
Mar 3, 2008
12
US
I have a several Defined fileds in my report and it is taking for ever to run the report in painter...Is there anything I can do to make them display faster?


Thanks,
 
The first question I have is:

Does it run faster without the DEFINEd fields?

If not, then they don't matter. If so, then are you SELECTING on DEFINEd fields? And, could you post the MFD and DEFINEs, so we can guess at what is causing the slowdown?
 
Once I put in the Define fields it runs a lot slower...I wait 3-5 minutes for the report to come up.


2007Sales/P12= IF AGENCY_SALES_V.AGENCY_SALES_V.YR EQ '2007' THEN AGENCY_CURR_SALES ELSE 0

2008Sales/P12= IF AGENCY_SALES_V.AGENCY_SALES_V.YR EQ '2008' THEN AGENCY_CURR_SALES ELSE 0

AgencyUtilization/P12= IF 2007Sales GT 0 THEN AGENCY_SALES_V.AGENCY_SALES_V.AGENCYID

2008FutureSales/P12= IF AGENCY_SALES_V.AGENCY_SALES_V.YR EQ 2008
AND AGENCY_SALES_V.AGENCY_SALES_V.MTH GE 1
THEN AGENCY_SALES_V.AGENCY_SALES_V.AGENCY_FUT_SALES
ELSE 0

2007pax/P12= IF AGENCY_SALES_V.AGENCY_SALES_V.YR EQ 2007 THEN AGENCY_SALES_V.AGENCY_SALES_V.AGENCY_CURR_PAX ELSE 0
 
In your request, are you SELECTING (using WHERE) on the DEFINEd fields? If so, and the calculation can't be passed to the engine, then all records must be returned, so it can be evaluated by the client. If you look at the trace (assuming it's SQL based), you should see a message that optimization was prevented, and why.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top