There are 2 queries and 1 report.
1) Query1 does the same thing as Query2 in a different way.
2) Query1 runs in 12 seconds.
3) Query2 runs in 4 seconds.
4) Report tied to query1 runs in 7 seconds.
5) Report tied to query2 runs in 20 seconds.
Does anyone have any idea why this would happen or how to remedy it? I am really trying to get run time down.
In reality there are more than 2 queries as the function is quite complex. The two queries I am talking about are the 'final' queries that get tied to the report. Each one calls on its own line of queries/tables to perform its function. The final result for each query is identical. (except the runtime)
1) Query1 does the same thing as Query2 in a different way.
2) Query1 runs in 12 seconds.
3) Query2 runs in 4 seconds.
4) Report tied to query1 runs in 7 seconds.
5) Report tied to query2 runs in 20 seconds.
Does anyone have any idea why this would happen or how to remedy it? I am really trying to get run time down.
In reality there are more than 2 queries as the function is quite complex. The two queries I am talking about are the 'final' queries that get tied to the report. Each one calls on its own line of queries/tables to perform its function. The final result for each query is identical. (except the runtime)