July 3, 2003 at 3:48 am
I have a few lengthy stored procedures(SP) that make use of temporary tables(#tables). Obviously these #tables are only valid for the scope of the SP, is there much advantage to building indexes in the SP for the #tables? Sure the time taken to create the #table and the index is greater than the time saved by not using the index?
Does anyone have any ideas?
TIA
July 3, 2003 at 5:25 am
I have had gains from creating Non-Clustered index on temp tables. When I tried a Clustered, it became slower. I guess it's because of shifting the data.
Create a Index and run the proc, then run it without and see the difference in DiskIO and time.
Table in question had about 5000 rows in it. (I was just testing indexing on temp tables)
Cheers,
Crispin
Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply