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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Speeding up access time of a query containing a call to a module

Status
Not open for further replies.

enuss

MIS
Joined
Mar 16, 2004
Messages
37
Location
US
We have an access database frontend for reporting purposes that is pulling from an oracle backend. I am trying to speed up the reporting time. Currently, we have a query that looks like this:

SELECT CDate(DateForDayInGivenWeek(1,Format$(IIf(IsDate([EEVENTTIME]),
CDate(Format(CDate([EEVENTTIME]),"m/d/yyyy")),Null),"ww"))) AS [Date]
FROM EWORK_EEVENT INNER JOIN EWORK_EDI_TRACKER ON [EWORK_EEVENT].[EFOLDERID]=[EWORK_EDI_TRACKER].[EFOLDERID]
WHERE ((([EWORK_EEVENT].[EEVENTTIME]) Between CDate(GetDateRange(5)) And CDate(GetDateRange(6))) And (([EWORK_EDI_TRACKER].[CHKABORTED])=0) And (([EWORK_EEVENT].[EACTIONNAME]) Like "Forward Exceptions" Or ([EWORK_EEVENT].[EACTIONNAME]) Like "Send Email"))
GROUP BY CDate(DateForDayInGivenWeek(1,Format$(IIf(IsDate([EEVENTTIME]),
CDate(Format(CDate([EEVENTTIME]),"m/d/yyyy")),Null),"ww")));
Where DateForDayInGivenWeek is a locally created function.

I have determined that this function is what is slowing up the access time. This function basically sends each individual record through a check in order to pull out the start date of each week in a given month. Does anyone have any idea how this could be sped up? I attempted to use some code as well, but I think I need to establish a connection to the oracle table in the code, even though I am linked through the access jet/sql engine. using a passthrough query doesn't seem to help, but I could be doing it wrong.

Any ideas?
 

A first step would be to replace the LIKE operator with = since you don't use wildcards ? or * for searching

 
try creating the whole query on the server, including the criteria checking, and then in access just pulling off the results of the query...

--------------------
Procrastinate Now!
 
Jerry, you are right, I do need to take the "LIKE" out... but this doesn't seem to be speeding it up much.

Crowley, that might be an option. I will look into it.

Thanks both of you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top