Quantcast
Viewing all articles
Browse latest Browse all 9076

Re: select doing sort in tempdb is preventing tempdb log truncation

For getting a spid's total tempdb space usage try using the pssinfo() function, eg:

 

    select pssinfo(<spid>,'tempdb_pages')

 

I've got a couple monitoring scripts that use this function and I've found it's quite good at giving me a breakdown of how much tempdb space (#temp tables, worktables) is being used by each spid.

 

------------

 

As for the NULL monProcessObject.partitionsize values ...

 

1 - this table provides a point-in-time snapshot of objects being referenced/managed by the SPID; if your MDA query was run near the start of the murex query it may be the worktables had been created but not yet populated

 

2 - there could be a limitation with the population of the partitionsize column for worktables, eg, MDA may be presenting the size of the object as measured at the beginning of the query *and* it may not check for a change in size during execution; you could run some tests to verify/refute this hypothesis, eg, for a SELECT/INTO <{perm|temp}_table> does monProcessObject show the table's size growing as the query progresses, or does it show NULL/0 for the entire run?


Viewing all articles
Browse latest Browse all 9076

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>