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

Report and Query runtime do not match 1

Status
Not open for further replies.

MBorofsky

Programmer
Nov 24, 2004
47
US
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)
 
Can you play with your joins? Some times being able to change a left or right join to an equal join will speed things up.

Regarding the report opening, I find that when I can run my query to a temp table, and base the report on that, I get lots of increased speed, especialy if the user needs to print multiple copies of a very complex report.



ChaZ
 
Having the report pull from a table did the trick, thanks. Runtime is now significantly faster.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top