I am describing basic help of SSMS to discard the result of query after it executes in SQL Server.
I was testing my SQL query performance with the 10000000 records and enable execution plan.
I have found that SQL Query Window is taking very high memory resource and taking too much time to display all this data into our result grid.
I just want to check execution plan of that query, but unfortunately it was taking more time.
We have one option in SSMS, using this we can discard the result of a query after execution.
You can find this menu, Tools -> Options -> Query Results -> SQL Server -> Results to Grid Tab and check mark the ” Discard results after execution ” option.
Note: This option is applied in your new query window so do not test any query in existing open query window.