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.
| Author |
Topic |
|
iamsmahd
Yak Posting Veteran
55 Posts |
Posted - 2006-01-04 : 02:26:58
|
| Hi all.I have a query (Q1) which consists of 3 main parts (p1, p2, p3) as 3 subqueries.all of them are ratherly the same and differ in one number::p1 : select * from t1 inner join t2...... where t2.crsLevel = 2p2 : select * from t1 inner join t2...... where t2.crsLevel = 1p3 : select * from t1 inner join t2...... where t2.crsLevel = 6I made a function for them (f1) which has 1 input variable and call it with different inputs to execute p1, p2 and p3. But still Q1 is slow.now my question is : my query (Q1) needs long time to execute. HOW CAN I improve the execution time ? IS there any way for it ?THANK YOU VERY MUCHsonia |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-01-04 : 03:15:29
|
| How many data do each table have?Do the tables have proper indices?MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|