user avatar
user avatar
user avatar
Gabe
  • Member for 11 years, 4 months
  • Last seen more than a week ago
475 votes
2 answers
248k views

What's the difference between a temp table and table variable in SQL Server?

  • 78.1k
104 votes
9 answers
42k views

Where are some useful SQL puzzles to teach SQL in a workplace?

  • 477
100 votes
2 answers
239k views

Connect to SQL Server with Windows Authentication in a different domain

  • 1,125
75 votes
1 answer
88k views

MERGE a subset of the target table

  • 1,539
62 votes
6 answers
90k views

When should I rebuild indexes?

  • 14.3k
60 votes
2 answers
9k views

Cast to date is sargable but is it a good idea?

42 votes
2 answers
2k views

Why does changing the declared join column order introduce a sort?

41 votes
3 answers
9k views

difference in execution plans on UAT and PROD server

  • 61.2k
31 votes
4 answers
2k views

What is a scalable way to simulate HASHBYTES using a SQL CLR scalar function?

  • 30.5k
30 votes
2 answers
125k views

What is the fastest way to insert large numbers of rows?

  • 2,747
26 votes
5 answers
40k views

SQL Server 2012: Generate Scripts from command line

  • 403
23 votes
1 answer
5k views

What exactly can SQL Server 2014 execute in batch mode?

  • 7,160
23 votes
1 answer
17k views

Insert with OUTPUT correlated to sub query table

22 votes
3 answers
2k views

Why would a table with a Clustered Columnstore Index have many open rowgroups?

  • 9,476
22 votes
4 answers
34k views

FOR XML could not serialize the data because it contains character (0x0000)

  • 7,104
22 votes
4 answers
19k views

Choosing the right algorithm in HashBytes function

  • 3,644
20 votes
3 answers
16k views

Trace Flag 4199 - Enable globally?

19 votes
4 answers
23k views

SSMS Tools Pack Alternative [closed]

  • 1,185
19 votes
2 answers
187k views

Converting a VARCHAR to VARBINARY

18 votes
1 answer
5k views

SQL Server--If logic in stored procedure and the plan cache

  • 305
18 votes
2 answers
43k views

Sql Server - Best Practices for Growing Database Files

  • 407
17 votes
5 answers
4k views

Inclusion of ORDER BY on query that returns no rows drastically affects performance

  • 273
17 votes
1 answer
1k views

Query strategies using SQL Server 2016 system-versioned temporal tables for Slowly-Changing Dimensions

16 votes
2 answers
16k views

How to optimise T-SQL query using Execution Plan

  • 425
14 votes
6 answers
8k views

SQL Server Checklists

14 votes
2 answers
33k views

Why is this query not using my nonclustered index, and how can I make it?

  • 1,667
13 votes
4 answers
9k views

Rebuilding Indexes, DB now 10x the size

12 votes
1 answer
3k views

Should I disable "auto update statistics" in a data warehousing scenario?

  • 223
11 votes
2 answers
19k views

why is io_stall_writes_ms so much higher for tempdb?

11 votes
1 answer
1k views

Definitive list of steps for SQL Server baseline testing?

  • 2,679