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?
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?