Skip to main content
J.D.'s user avatar
J.D.'s user avatar
J.D.'s user avatar
J.D.
  • Member for 6 years, 4 months
  • Last seen this week
43 votes
7 answers
9k views

What's a good use case for SELECT * in production code?

36 votes
2 answers
5k views

If a CTE is defined in a query and is never used, does it make a sound?

36 votes
2 answers
8k views

Is it generally faster to select into a temp table than selecting into an actual table?

13 votes
1 answer
3k views

How to get the parameter values of a stored procedure that's in the middle of execution?

12 votes
1 answer
3k views

Why is casting a DATE field to VARCHAR datatype non-deterministic and is there a way to make it deterministic?

12 votes
1 answer
780 views

Is there a reliable way to check if a trigger being fired was the result of a DML action from another *specific* trigger?

10 votes
1 answer
1k views

Is it possible to re-use a query plan from the plan cache from one database in another database?

9 votes
1 answer
2k views

Is the NOLOCK hint completely safe to use on a table that's guaranteed not to change?

9 votes
5 answers
6k views

Linked Server connection started failing with "Cannot generate SSPI context ... SQL Server Network Interfaces: The logon attempt failed" error?

8 votes
1 answer
389 views

If a stored procedure is altered while it's currently being used in a cursor, does the cursor continue using the old query before it was altered?

8 votes
1 answer
692 views

Is there a reliable way to determine how long it took the optimizer to generate a query plan?

8 votes
2 answers
14k views

The disappearing act of the "Invalid length parameter passed to the LEFT or SUBSTRING function" error

8 votes
3 answers
7k views

Does restarting the SQL Services (on the machine) clear the server cache (for things like query plans and statistics)?

7 votes
1 answer
10k views

What is the purpose of "Schema Owner"?

7 votes
1 answer
2k views

How to GRANT permission to execute stored procedure?

7 votes
2 answers
10k views

MS SQL Server: Do multiple queries in a batch ever execute in parallel and if so what happens when the second query is dependent on the first?

7 votes
2 answers
10k views

SQL Server 2017 Enterprise vs Standard - Online Indexing and Online Schema Change

7 votes
3 answers
880 views

What events still occur within a transaction that gets rolled back?

7 votes
1 answer
357 views

Is there a way to determine what kind of data is sitting in the Redo Queue for an AlwaysOn AG Secondary Replica?

7 votes
1 answer
4k views

Is there an easy way to SELECT FROM another session's temp table?

7 votes
4 answers
1k views

Is my queue table implementation race condition safe?

7 votes
2 answers
1k views

Is the Query Store's Overall Resource Consumption report telling me my database is doing terribly or are the numbers just whacked?

6 votes
1 answer
2k views

Are the results of the STRING_SPLIT() function returned in a deterministic order?

6 votes
1 answer
1k views

Can adding a columnstore index to a table affect read performance of a query that uses a rowstore index on the same table?

6 votes
1 answer
112 views

At what point is a (disk-based) table removed from memory after data is read from it?

6 votes
1 answer
651 views

Is there any difference with specifying the primary key as an include column in a nonclustered index?

6 votes
1 answer
3k views

If sp_ExecuteSql creates a new session, how come I can access a local temp table created (prior to it's execution) outside of the dynamic SQL?

5 votes
2 answers
544 views

Does the command SET STATISTICS...ON turn statistics information on for all queries running throughout the server or just the current connection?

5 votes
1 answer
7k views

Why can't I create a new schema with the owner set to dbo?

5 votes
1 answer
2k views

Okay to run sp_refreshview against all views on a regular basis?

1
2 3 4 5 6