Viewing 15 posts - 1,336 through 1,350 (of 5,843 total)
TheSQLGuru (1/27/2016)
January 27, 2016 at 8:38 am
It seems pretty obvious - someone or some thing is setting the database to single user mode. Find and prevent that and you should be good. Not sure if a...
January 27, 2016 at 8:37 am
As I suspected, you have MULTIPLE NC indexes that start with ApplicationGUID. Since that value is VERY specific (a few tens of rows max out of 1.6M) I bet you...
January 27, 2016 at 7:34 am
1) That's a LOT of stuff for us "unpaid consultants" to wade through to offer help on a forum!!!
2) I would run sp_whoisactive regularly (including using differential capabilities) to check...
January 27, 2016 at 4:58 am
Query plans will definitely help. As will table and index definitions.
Look for data value skew.
Also note that filtered indexes have ALL KINDS of limitations, gotchas, caveats, provisos, bugs, etc....
January 26, 2016 at 3:24 pm
read Books Online to understand about sp_executesql.
Just call a sproc with EXEC
January 25, 2016 at 6:37 pm
You need to run sp_whoisactive on it's own connection while both of the other queries are running (and blocking each other). It will show you details. Adam has an awesome...
January 21, 2016 at 12:20 pm
1) NEVER EVER use a scalar UDF if you can avoid it. HORRIBLY BAD STUFF!!!!!!!!
2) NEVER wrap a function around a column in a WHERE clause if you can avoid...
January 21, 2016 at 7:33 am
1) I would avoid using MD5 for uniqueness. http://crypto.stackexchange.com/questions/1434/are-there-two-known-strings-which-have-the-same-md5-hash-value for example
2) I hope you are computing your hash outside SQL Server
3) It would then be more efficient and faster to...
January 21, 2016 at 7:22 am
emanuele 8962 (1/21/2016)
from session number 1:
BEGIN TRY
BEGIN TRANSACTION
update TEST set A=1 where A=2;
COMMIT TRANSACTION
END TRY
BEGIN CATCH
IF (XACT_STATE()) = -1
BEGIN
ROLLBACK TRANSACTION
END
IF (XACT_STATE()) = 1
BEGIN
COMMIT...
January 21, 2016 at 7:00 am
set quoted_identifier off
go
select "here is how you write code" + name + "
go"
from sys.objects
where type = 'U'
--I use quoted identifier off so I can use single ticks in my code-writing-code...
January 20, 2016 at 9:40 pm
You are doing < 3000 page reads with this query. You could do that at floppy-disk speed (which many of my clients actually have for their IO performance!!) and STILL...
January 20, 2016 at 9:38 pm
bebe022476 (1/20/2016)
select document.DocumentID as 'document.document.id',
document.DocFolderID as 'document.document.folderID',
document.FileName as 'document.document.description',
document.FileSize as 'document.document.fileSize',
document.ModifiedDate as 'document.document.modifiedDate',
document.TableName as 'document.document.tableName',
document.EntityCode as 'document.document.entityCode'
from...
January 20, 2016 at 2:41 pm
Functions around columns in WHERE or JOIN clauses can be DEVASTATINGLY BAD!! CPU burn, bad estimates due to preventing good statistics acquisition (meaning bad plans and bad concurrency both, including...
January 20, 2016 at 8:37 am
I would say to NEVER EVER use the SSMS GUI for such things (or creating/modifying objects or many other "DDL" type things - too many bugs and poor design choices)!!
You...
January 20, 2016 at 8:33 am
Viewing 15 posts - 1,336 through 1,350 (of 5,843 total)