Skip to Content
0
Former Member
Oct 14, 2014 at 08:21 PM

What's reason cause the insert delay in tempdb and how to improve it?

46 Views

I have ASE 12.5. The tempdb is on ramdisk.

Then I have a SP with a query like

select * from mytab....

...

When I run this SP, only 11 rows for the result. It took about 2 seconds.

Then I change the SP to keep result in a named temp table like:

Create table #tmptab...

Insert into #tmptab

select * from mytab....

then run it again, it's took about 6 seconds. big difference. As only 11 rows and everything should be done in memory, The speed should not slower than that. How to figure it out and improve the performance for this case?