Reputation
31,059
Next tag badge:
478/400 score
71/80 answers
Badges
8 78 131
Newest
 Nice Answer
Impact
~883k people reached

Jan
3
comment Writing Conditions in Left join sql
This isn't a "rare scenario". It is a straight forward application of the rules described there.
Jan
3
comment Writing Conditions in Left join sql
Does this help?
Jan
2
comment Adding Last 12 Months to a row in a table (SQL Server)
This inserts a single value to 12 rows. I think they want the other way round (12 values to a single row)
Jan
2
comment Adding Last 12 Months to a row in a table (SQL Server)
next question, why do you need to store all 12 months? Presumably you just need to store one as the others can be calculated by just doing dateadd(month? Also what is this table actually representing anyway?
Jan
2
revised SQL Server 2012 Standard server with 50 instances won't uninstall instances
added 129 characters in body
Jan
2
comment Adding Last 12 Months to a row in a table (SQL Server)
Please give the table definition and example "before" and "after" states.
Jan
2
reviewed Reject At What Point Should I Split or Partition a Very Large but Simple Table
Jan
2
comment Resource cost of a blocked query
Though I guess it will still hold resources such as memory grants until it ends.
Jan
2
awarded  Enlightened
Jan
2
awarded  Nice Answer
Jan
1
comment Error 18456 State 38 on Deleted Databases
Error 18456 is login failed isn't it?
Jan
1
comment Understanding statistics, execution plans, and 'ascending key problem'
RECOMPILE wouldn't cause a stats update anyway.
Jan
1
comment Store Repeated Data
So the proposed new structure is 100 heap tables. Each heap containing 1bn rows with a single column with a bigint value? What kind of queries do you do against this data? Purely aggregation? Or are there other columns too?
Dec
30
comment What do these parameters mean at the beginning of my SQL Server query plan?
Are suggestions 1 and 2 deliberately the same?
Dec
30
comment What is the cause of this problem with CONVERT()?
@MaxVernon I didn't find it documented. I'm not sure whether or not this is a standard (e.g. IEEE) format but it was easy to see the first two bytes by trial and error. E.g declare a variable of type numeric(38,0) and convert it to varbinary.
Dec
30
revised Get the pais_id not associated to fabricante_distribuidor_id and producto_solicitud_id, the opposite from SELECT query
deleted 171 characters in body
Dec
30
comment Can rebuilding indexes cause worse performance after the rebuild is finished?
And before doing that have a look at STATISTICS IO read ahead reads/physical reads to see if the 6 minutes query is even reading from disc at all.
Dec
30
comment Can rebuilding indexes cause worse performance after the rebuild is finished?
Agree with @Reaces. Rebuilding indexes will have updated stats and invalidated existing query plans. Maybe you were unlucky with the parameter values passed when the new plan was compiled.
Dec
30
revised Can rebuilding indexes cause worse performance after the rebuild is finished?
edited title
Dec
30
comment What is the cause of this problem with CONVERT()?
The first byte is scale (0x01 = 1), The second byte is precision (0x00 = 0), The final byte is the value (0x01 = 1). Not sure what bytes three and four are for. The sign is in there but that doesn't need two bytes. Certainly flipping that bit doesn't seem to have affected anything.