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 |
|
ramyaraman
Starting Member
10 Posts |
Posted - 2008-06-26 : 10:30:10
|
| I have TableA. ColA ColB 123 blah....Table B has the data like belowColA ColB123 ABC123 DEF 123 GHITable B may have one or more rows for 123. This is dynamic which is derived from another table.I want the output as123, blah, ABC ** DEFSo on my select I call a function funct(123)this function will loop thru TableB and return ABC ** DEFThis works fine, except that it takes longer since I have 5 different functions doing similar stuff with different tables. Having millions of rows in TAbleA is making the query run very slow. What is the best method to do this? |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
ramyaraman
Starting Member
10 Posts |
Posted - 2008-06-26 : 10:36:29
|
| It is sqlserver 2000 |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-06-26 : 10:40:13
|
| Did you use the code similar to the one posted at Link1?MadhivananFailing to plan is Planning to fail |
 |
|
|
ramyaraman
Starting Member
10 Posts |
Posted - 2008-06-26 : 11:26:40
|
| Yes, I did. I was using cursor on the function to do this. Now I changed it to the case similar on the link. Still there is no improvement in performance |
 |
|
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2008-07-04 : 04:07:29
|
| Have you got an index on ColA of your tableB?If your function is having to table scan every time then your performance will be awfull.-------------Charlie |
 |
|
|
|
|
|