Reputation
33,578
Next tag badge:
508/400 score
72/80 answers
Badges
8 87 147
Newest
 sql
Impact
~1.1m people reached

Jul
18
comment Index on a persisted computed column not seekable?
Please update this if you get any interesting response!
Jul
18
revised Index on a persisted computed column not seekable?
added 277 characters in body
Jul
18
revised Index on a persisted computed column not seekable?
Spelling, formatting
Jul
18
comment existing foreign key that references fields with different datatype (char(8) and varchar(8))
@Paolo - You'd be looking for "breaking changes" in the release notes for SQL Server 7 but I don't think much documentation is online for SQL Server prior to 2000.
Jul
18
comment existing foreign key that references fields with different datatype (char(8) and varchar(8))
@ypercube - From testing on 2005 with 6/6.5 compatibility mode this would not be allowed Columns participating in a foreign key relationship must be defined with the same length.
Jul
18
comment Database Maintenance Planner greyed out (disabled)
Any help? dba.stackexchange.com/q/12584/3690
Jul
18
comment existing foreign key that references fields with different datatype (char(8) and varchar(8))
@PaulWhite - Yep this test on 2005 shows it was preserved that long i.stack.imgur.com/2w7cj.png (2005 supported 60/ 65/70, 2008 just 80 up)
Jul
17
answered Index on a persisted computed column not seekable?
Jul
17
awarded  Enlightened
Jul
17
awarded  Nice Answer
Jul
15
comment Effective indexing and querying of overlapping date/time ranges
How many rows will you typically have for each AccountId?
Jul
14
awarded  Nice Answer
Jul
11
comment Overcome MERGE JOIN(INDEX SCAN) with explicit single KEY value on a FOREIGN KEY
Do your foreign keys have CASCADE action set? that affects the locks taken
Jul
11
comment nvarchar(max) converting to varchar and table optimization
That is still the estimated plan - Not the actual. The actual execution plan has information about actual rowcounts. I'm not sure why the plan shows full text operators as you don't seem to be using any full text syntax. Is the column SubType full text indexed?
Jul
11
comment Multiple indices on a table
Well clearly you want to set up your index in the order that makes it easiest to satisfy your queries. i.e. colum with equality condition first.
Jul
10
comment Query takes longer as domain user than local admin
Is the query parameterised? What do the execution plans look like? Particularly the compiled vs runtime value of the parameters. Different logins can share each other's plans as long as they both use the same default schema or the query doesn't rely on implicit resolution and various other session options such as default language are the same.
Jul
10
comment Multiple indices on a table
With the classic Phone book example (composite index lastname, firstname) - Look for all people with lastname equal to "Smith" and later or equal than "Martin" is pretty easy but looking for people with lastname >= "Smith" and firstname="Martin" much less so.
Jul
10
comment Multiple indices on a table
The queries you've shown have a >= not = for all columns...
Jul
10
comment Multiple indices on a table
So an index on InstanceId, Created, UserId would be equally good for query 1 and also satisfy query 2.
Jul
10
comment Multiple indices on a table
What is the query that misses index 1? Does it do an equality predicate on all three columns?