Regarding shrinkdb and # table

  • Hello frineds!!

    Just i want to concern one thing @ tempdb..

    I will run query in QA which is using # table....like

    update table1 set id = '123'

    where id IN (select id from #tab)...near @ 6205679 records will going to update..and at about 20 mins later my scheduled job shrink tempdb will run..but i observed yesterday when i was doing same thing..disk space reducing...like 18.6 Gb then 18.4 gb then 18.1 gb like that goes on....is shrinkdb job and QA query relation this reduction of space or will QA effect on shrinkdb job....

    If any body wants to focus on this issue,you welcome


    Regards,

    Papillon

  • Why are you shrinking tempdb? If it grew to a certain size that's because the query workload you have needs that much tempdb space to run in. If you shrink it, it will just have to grow again - you're wasting cpu/IO resources and causing random queries to take the perf hit during the tempdb grow.

    What you should be asking is why on earth is your tempdb 18Gb in the first place? Looks like you've got a bunch of badly witten queries - that's where you should focus your attention. If you can't change the queries, leave tempdb alone.

    Regards

    Paul Randal
    CEO, SQLskills.com: Check out SQLskills online training!
    Blog:www.SQLskills.com/blogs/paul Twitter: @PaulRandal
    SQL MVP, Microsoft RD, Contributing Editor of TechNet Magazine
    Author of DBCC CHECKDB/repair (and other Storage Engine) code of SQL Server 2005

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply