Skip to Content

Insert using table variable causes heavy load, fills up tempdb log


Running "insert into @table_variable select * from @table_variable" causes CPU 100% and heavy writes to tempdb.
It does not return response for a few minutes and finally ends up with tempdb log full.

ASE 16.0 SP03 PL02

Reproducing the issue:

1> declare @t table (a int)<br>2> insert @t values (1)<br>3> insert @t select * from @t<br>4> select count(*) from @t<br>5> go<br>(1 row affected)<br>Space available in segment 'logsegment' has fallen critically low in database'tempdb'. All future modifications to this database will be aborted until thetransaction log is successfully dumped and space becomes available.

Could any of you check this behavior?

Kazuo Otani

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Apr 16, 2018 at 03:06 PM

    Hi Kazuo,

    There is an open CR for this behavior, CR 809237. I've started writing KBA 2632248 for it but
    (as I'm about to start a couple days of vacation) I don't expect to have the KBA published until next week.

    Bret Halford

    Add comment
    10|10000 characters needed characters exceeded