June 6, 2016 at 6:39 pm
I have a DB with some tables more than 7 millions record. However any query ,even with join , from those table are slow and the they are using tempdb at all. The reason that I say tempdb is not used is because its size is about 8 MB and it is not changed. I had no restart to Server them my assumption is that tempdb is not restored from model. Can anyone help me to find why SQL is not using tempdb?
June 6, 2016 at 8:24 pm
java56p 72136 (6/6/2016)
I have a DB with some tables more than 7 millions record. However any query ,even with join , from those table are slow and the they are using tempdb at all. The reason that I say tempdb is not used is because its size is about 8 MB and it is not changed. I had no restart to Server them my assumption is that tempdb is not restored from model. Can anyone help me to find why SQL is not using tempdb?
Why do you think that using TempDB would make your queries faster? The key will be how the queries are formed, whether the predicates are SARGable, and whether there are any indexes that they can take advantage of.
--Jeff Moden
Change is inevitable... Change for the better is not.
June 7, 2016 at 3:21 am
TempDB is used for temp tbles, table variables, sort and hash spills, spools, version store and a few other things. If your queries aren't using temp tables theyn thyey may well not use TempDB, and that's not a problem.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply