December 4, 2019 at 4:36 pm
one of the things we were taught(more than 20 years ago) was how to do capacity planning, how many rows per page, work out what was out of row etc etc - it seems to be a missing skill these days.
Heh... one of many missing skills.
no one seems to care because we "just buy more disks"
I've learned to never turn down hardware. 😀 But, on that same note, I shoot myself in the head in that area because I do exercise the skill you speak of and train others to understand the underlying advantages when it comes to performance and so we very infrequently have to buy extra disk space. The good part is, I work with a group of people that actually "get it" and they'll actually approach me during the design phases of things now. A lot of them now come with table designs with the lessons they've learned already built in. They're really good folks that are getting really good at it.
we have a project on the go at the minute (not mine) and it's "code first" the database design it put out will not last a week
We all know what happens after such designs make it to production. 🙁 All I can do is offer my sincere condolences and, at the same time, congratulate you on the job security they're building in for you. 😀
--Jeff Moden
Change is inevitable... Change for the better is not.
December 4, 2019 at 4:48 pm
jeff- you just made me laugh out loud and spill my tea all over my new keyboard about job security. I was chatting to a guy I work with last night.. I think I was a bit insecure (departmental moves etc) and he was saying " don't worry, we need a bloody DBA, as much as we don't like them" - it was a joke
MVDBA
December 4, 2019 at 6:16 pm
Sam
Space from deleted data is not automatically released to the operating system. You have to shrink the data files to get the space back.
Please post the code that your App team is using to do the deletes.
John
Hi John,
Thanks for the response. I can clearly 500 mb free space but the shrinkfile command doesnt release the space.
I will try to get the code from app team (if possible).
Sam
December 4, 2019 at 6:18 pm
Yes. I tried the shrinkfile but it doesnt release free space which is around 500MB. I dont know why!!
December 4, 2019 at 6:38 pm
I am using shringfile with truncateonly option.
December 4, 2019 at 7:06 pm
I am using shrink file with truncate only option.
That will only clear space if it happens to be free at the end of the file. As the data you have deleted will be spread across the whole file it won't work. You need to shrink without the "truncate only" option which will move data from the end of the datafile to the unused parts of the datafile then knock the end off. But this can have the effect of reducing the performance of the database by fragmenting tables and indexes so unless you have a good SAN drive it might be better to migrate the data to another datafile then shrink the original file.
December 4, 2019 at 9:38 pm
Yes. I tried the shrinkfile but it doesnt release free space which is around 500MB. I dont know why!!
Ok... I'm humbled. NICE CALL MIKE!!! 😀
--Jeff Moden
Change is inevitable... Change for the better is not.
December 4, 2019 at 9:40 pm
jeff- you just made me laugh out loud and spill my tea all over my new keyboard about job security. I was chatting to a guy I work with last night.. I think I was a bit insecure (departmental moves etc) and he was saying " don't worry, we need a bloody DBA, as much as we don't like them" - it was a joke
Gosh... I hope it's not a joke... 😀 Everyone should know by now that the best medicine tastes the worst. 😀 😀 😀
--Jeff Moden
Change is inevitable... Change for the better is not.
December 4, 2019 at 9:44 pm
Sam, I hope you didn't miss the following because that SHRINK FILE stuff isn't going to solve your slow deletes.
https://www.sqlservercentral.com/forums/topic/slow-deletes#post-3704281
--Jeff Moden
Change is inevitable... Change for the better is not.
December 6, 2019 at 7:36 am
Thanks everyone for sharing your valuable input.
Finally, we move the data into a separate table. We retained some which is required in the newly created table and drop the existing table.
App team agreed for it.
December 6, 2019 at 8:49 am
just make sure the new table is not a heap 🙂
MVDBA
Viewing 12 posts - 16 through 26 (of 26 total)
You must be logged in to reply to this topic. Login to reply