News & Opinion

What Does This Button Do? Wrong Answers Only.

One of my favorite memes is Wrong Answers Only, where you show something and people have to answer incorrectly, like this and this and this.

So now it’s your turn: you’re in SSMS, you right-click on a database, and go into Tasks:

What does that bottom right task do? Wrong answers only.

Free, 3× a week

Get my new posts by email

Three posts a week, plus a Monday roundup of the best database news from around the web.

126 comments

  1. I heard it limbers up your SQL Server so it performs better under heavy loads. Protects pages from splitting, that sort of thing.

  2. That menu clearly activates “SQL Voodoo” up in the cloud, don’t trust it! 😉 Honestly, looking at the docs its quite an interesting feature. Thanks for posting Brent.

    1. Folks, please don’t google “goatse” if you don’t get the reference. Just be comfortable in knowing that you’re better off being in the dark on this one.

    2. That? It opens a dialogue that allows you to do precisely what it says — stretch the database out to between 101% and 200% of its current size, so that you can finally get that disk space you’ve been asking for for years. Turns your proactive failures into a reactive success. It can’t be run if the database is part of a replication setup, is part of an AG, or uses the TEXT/NTEXT /IMAGE data types.

      Shrink is, of course, the opposing operation; which you should only run once the space is available to the instance. Some people can’t grok this however and wonder why nothing happens when they fire SHRINK* files off at random.

      1. My fake answer is apparently here instead of one level up, probably because I was originally going to reply to tell Andy Mallon that they’re A Bad Person 🙂

        1. I dunno, man. Maybe you just need to soak in the tub, boy.

          (PLEASE don’t google that if you don’t already know what it is!!)

  3. Allow you to send your data somehere up in the clouds! And then rains with meatballs! And George Clooney will visit!

  4. a quick and easy way to increase all the datatypes in a database. ints become bigints, varchar(255) becomes varchar(510), varchar(max) becomes nvarchar(max) etc.

  5. Makes it so your data is more dense in the beginning and the ends of your tables, adding sparse rows in the middle.

  6. Stretch your wallet and enter into this fancy world of cloud ( AKA database made in heaven supported by Angels)

  7. It increases fill factor by 20%. Repeated clicks of this button will fail with an undocumented error once fill factor is 1%.

  8. Stretches the task – says so right on the menu. I assume that’s like a scope creep or something.

  9. It increases the font size on all varchar and nvarchar columns by 2 pts and changes the font to Comic Sans to use more pages.

  10. I like Mark’s answer but it is too passive. Here is what it actually does – Signs the clicker up for a Bikram Yoga 30 Day Home Yoga Challenge. The course is mandatory because Microsoft believes that the more hot yoga done by coders/dbas the better their code/databases will be. Also, the CDC has learned that coders/dbas spread viruses due to sloppy code practices so they have enlisted the federal governments police powers to ensure programmer/dba compliance. Finally, the home course is required because of the Covid-19 problem and the thought of a group of us in spandex, sweating and grunting was too much for the mind to grasp

    1. Typical Microsoft, they give a Stretch option in the GUI, but every good DoughBase Administrator knows you have to use the DBCC KNEAD() function first for best Stretch performance.

  11. It stretches time, but only for queries which approach the asymptote, and should only be used aboard high-velocity STL spacecraft.

  12. Increases free space in the database by reducing fillfactor in all indexes. It also dramatically increases any costs associated with the database.

  13. It stretches each individual page in the database’s data files, doubling them in size from 8k to 16k, and effectively doubling the overall size of the database. This operation can only performed once! Over stretching the database would cause flimsiness…

    1. Yess!!! Finally I won’t get that “Cannot create a row of size 8092 which is greater than the allowable maximum row size of 8060” when I try to add the 765th column to my table! Thanks Microsoft!

  14. Makes the database more limber for being worked out…
    increased ranges to slow degeneration,
    improves posture to help with better disk alignment,
    makes database more flexible requiring less resources and improves overall performance,
    and helps lessen tension and stress on the system overall.

  15. It reminds you that you’ve been working too hard, sitting in that same chair for way too long, so get up and stretch!

  16. It permits the operator to stretch the statistics for the application database so they are available through a linked server query connection thus eliminating the parameter sniffing issues for the remote SQL query.

  17. After loading all of your company’s data and KPIs into the database, use Tasks > Stretch to generate stretch goals. Note: Stretch goals are estimated in query plan cost values only.

  18. SQL Server by default runs queries from a full windup, for backward compatibility reasons. Switching to a stretch will allow you to more easily keep an eye on other queries running at the same time. (Note that this is available only in the Enterprise Edition.)

  19. Stretch: It’s best described as the SQL Shard feature for SQL Data Lake to stretch this puppy from SQL into PostgreSQL, Oracle and/or NoSQL all at the same time so you can easily STRETCH your on premise, easily accessed, single database, into a mass of distributed data lakes behind a single SQL pane in order to have one place to access your distributed data!

  20. It allows the database to take a ‘walk-about’ through the office, get some coffee, and get the data moving…

  21. Makes all queries in the database use query hints that are really helpful.* You’ll definitely notice a performance impact!

    *By really helpful, we mean with(nolock) because it’s a stretch that it would help in a given situation.

  22. The Stretch feature will assist your company statisticians in their jobs to stretch the truth for the growth numbers for each quarter. It stretches the numbers upwards to make the boss and company look good and fills in bad numbers with good ones! It stretches the truth for the sake of advertising and better job outlooks.

  23. it lowers the size of each page, so that you have less wasted space, allowing you to do more with less storage needs.

  24. When in lockdown, once a day, click on this option to let your database have some stretching or your database will lose tone and will go slow and you will have loads of performance issue…

  25. Issues undocumented DBCC command “DBCC STRETCH”.

    When complete, returns status “RRRRRRRRrrrrrrrrrrrrrr….. Oh yeahhhhh….”

  26. It’s a new feature, to use on heavily used databases. It starts an Yoga Session on the data, so they can calm down.

  27. Just as you would in bread making, as you stretch and kneed your dough, you’re incorporating air your mixture. In this case you’re incorporating air into you’re database. If you then wait for 2 hours, and let you database “rise”, the database icon in SSMS will turn into a loaf of bread icon.

  28. Last time I tried this my Azure subscription was taken down because there was no money left. So I know for sure it’s something like a “donate” button. 😀

  29. It is a brand new foreign-key constraint feature at database level. If you want a database to relate to others you can stretch it and it will be able to reach the related DBs

  30. Your database will get up and walk around for a few minutes, to clear it’s head and get a little exercise. Offers some light performance boosts when perofrmed daily, espeically if it hasn’t been done in several hours. It locks every table for a about 20 – 30 minutes while doing this, so be sure to perform this task during a maintenance window only.

  31. It gives a chance to DBA to streach the body and relax, sometimes It tickle DBA until he / she laughs.

  32. The product developers got bored and wanted some in-product entertainment so it opens up an old TV ad for a Stretch Armstrong toy.

  33. Stretch increases the size of the database by a configurable amount by default it is 24%. increasing the size of the Database then makes for less work for the CPU as it does inserts, it does not have to increase the size. It works similar to instant file initialization only after database is established.

  34. Can’t believe what i have read!I mean some of you are DB Professionals but it’s obvious what STRETCH does!!!!!1!!!!You press STRETCH and when you run a query that lasts more than 5 minutes SSMS or Azure data studio shows you exercises and yoga poses (volume up for Indian flute music) for stretching your back from all day sitting on the chair!And you call yourself professionals knowing SQL!!!

  35. It stretches SQL Server’s processing power across all computer CPUs on your entire network without increasing licensing costs, but you can only use it 90 seconds a day.

  36. Stretch is an OSHA requirement. It shuts down SQL Server for 10 minutes
    so all users can get out of their chairs to stretch.

  37. Stretch is for when you are getting low on disk space.
    It removed the platters and stretches them so they can hold more data.
    Does not work with SSD drives.

  38. Doesn’t do anything itself
    – press it and it changes to “your arms out”
    – press that changes to “crack your knuckles”

    it’s an instruction telling the user what to do before pressing “Take Offline”
    – they might be in for a bumpy ride 😉
    best be ready to do some quick typing

  39. Stretch makes your queries take longer on purpose…it’s a reverse-turbo button!! This way you have easy improvements to show customers when you uncheck this option!

  40. its a partial defrag of the database – guarantees that rows closer to the end of a table are always closer to the end of the underlying file, just not necessarily without any space inbetween. It’s called streatch because sometimes pulling those rows to the end of the file causes the total space assigned to tables to increase.

  41. It is of course used to exaggerate the size of the database to trick your infrastructure team that you need more disk space, so that there are times for lengthy procurement processes to procure the additional space.

    Interestingly in SQL Server 2008 (not R2), the feature was called “Bloat”.

    *None of the above is true!

  42. Strech means Streching. You have to run this task after every SQL Server reboot and every time before SQL Server will start the hard work – for example expensive queries – to avoid SQL Server injuries = database inconsistency 😉

  43. It increases the distance between rows. In order to “social distance” to protect it from computer viruses.

  44. It’s a typo.

    It should be Stritch and, when clicked, does a rather entertaining Broadway comedy routine, complete with scratchy-voided singing.

  45. I know exactly what this does. It tells the engine to get the most important financial data in the database and “stretch” it so that the Finance and Marketing people can stretch the truth! It’s a great feature that Oracle needs to get on board with.

  46. After your database has workedout very hard with heavy transactions, this option allows to “stretch” it muscles (aka pages) a little bit…!

  47. This puts the database into “Uber Auto Manage” mode, allowing you to get out of your chair and go stretch your legs for a bit.

  48. Increases server flexibility and reduces risk of database injuries prior to exercising a resource-intensive query.

  49. It automatically exaggerates the benefits of the project in the mandate to allow for more pizza and beer.

  50. When run on the stackoverflow database, takes all users that don’t post their error message and stretches them on the rack.

    Yes I have an axe to grind.

  51. Writes excuses for you when you’re asked “why is the Database slow.” Aka stretching the truth, but they use the term stretch so only deep tech folks know it. You’re welcome.

  52. It is the ultimate in performance tuning of course! First it begins by stretching the budget for those SSD disks, and then quickly (using linked servers with nested views and a cursor) stretches the performance of the CPU. After that it begins to work on user expectations, and the theory alternate dimensions to stretch out your next vacation.

  53. It lets you increase the size of the database on disk so your SAN and VM admins can’t try to take any unused space away from you, and allows you to ask for more. Sadly, Microsoft never added the complementary “Squish” option into the UI, which then allows you to return the database to it’s original size afterwards…

  54. It makes all your ASCII words extra loooooong! Oh Nooooooo. Means you can show off and say “My database is bigger than yours!”

  55. It stretches the database file extents to allow the files to more easily grow when needed. Kind of like stretching a balloon first before blowing it up allows it to expand quicker.

  56. It allows you to stretch your database to the sky, and then you turn around and wink at your storage team:)

  57. It calls DBCC STRETCHFILE behind the scenes. Microsoft implemented this new feature to undo the effects of the DBCC SHRINKFILE command, since they can’t take that feature away.

Leave a comment

Your email address will not be published. Required fields are marked *

Email me about new comments: