Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 store procedures in ms sql server 7.0

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-02-15 : 08:50:10
mmarcel writes "How do you make a store procedure that has multiple select statements and are linked together by the key word union all to run faster?"

efelito
Constraint Violating Yak Guru

478 Posts

Posted - 2002-02-15 : 09:40:45
"UNION ALL" is a bit faster than "UNION" just because it doesn't have to worry about filtering out duplicates. Other than that you can try and tune your individual selects and maybe add some indexes that will improve their performance which will help overall performance of the sp.

Jeff Banschbach
Consultant, MCDBA
Go to Top of Page
   

- Advertisement -