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 - 2005-06-14 : 06:19:45
|
| hi all....I have a report which uses a view for retrieving the result. The view is like this::-----------------------Select *From dbo.v_ExtStudRep028UNION Select *From dbo.v_PersonRep028-----------------------In each parts of the UNION (I mean the queries) I should call a function in order to get the price field.So, for example for the first part of the UNION query (v_ExtStudRep028 which is a view) I have ::Select f1 AS FieldOne, f2 AS FieldTwo, dbo.fn_Price(f1,f2) AS PriceFrom ...........Where ...........But I get my result records in my report page very slowly....How Can I improve my query? what is your opinion?Thank you ver y much.Sonia |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-06-14 : 06:37:05
|
| Did you use index for the key column?See index in Books On Line for more detailsMadhivananFailing to plan is Planning to fail |
 |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2005-06-14 : 07:33:50
|
| check both views. what are they returning? any duplicate data? any data you DONT need? could they be rewritten as one stored proc for your report/page?*need more coffee*SELECT * FROM Users WHERE CLUE > 0(0 row(s) affected) |
 |
|
|
|
|
|