Viewing 15 posts - 2,881 through 2,895 (of 7,609 total)
How is the underlying table clustered?
What the most common WHERE conditions used when you read this table?
The best, most complete solution overall is to best cluster...
March 27, 2019 at 8:10 am
I did get less execution time cost using COUNT() rather than COUNT_BIG():
SELECT
DB_NAME(database_id) AS db_name,
COUNT(*) / 128.0 AS buffer_pool_size_mb
FROM sys.dm_os_buffer_descriptors WITH (NOLOCK)
WHERE database_id <> 32767...
March 27, 2019 at 8:05 am
March 26, 2019 at 12:02 pm
Yes.
;WITH cte_dups AS (
SELECT *, ROW_NUMBER() OVER(PARTITION BY name ORDER BY id DESC) AS row_num /* keep the HIGHEST/LAST id */
FROM...
March 26, 2019 at 11:39 am
Try it this way:
SELECT *
FROM (
SELECT Sequence#, Member#, Group#
WHERE Group# = 'PP0018'
) AS iq1
WHERE Sequence# <> CASE...
March 26, 2019 at 11:12 am
March 26, 2019 at 11:06 am
March 26, 2019 at 10:21 am
March 26, 2019 at 10:19 am
Also I disagree with a "heck of a lot...
March 26, 2019 at 10:15 am
I have ruled out blocking.
How specifically? That's a lot of LEFT JOINs. Is it safe to use NOLOCK on those tables? If so, have you tried that? (Let...
March 26, 2019 at 8:08 am
Yes. You can say either:
In the old AdventureWorks2016 database
In ye olde AdventureWorks2016 database
but I don't think they should be mixed 😉
March 25, 2019 at 11:06 am
Without seeing the actual MERGE, can't get into specifics.
But could you try batching it yourself. For example, if the table being MREGEd has a unique clustering key, then...
March 22, 2019 at 12:04 pm
March 21, 2019 at 9:56 am
I think it's more clear and more flexible to just test each and add up a "not null" count accordingly:
CASE WHEN
CASE WHEN...
March 21, 2019 at 7:50 am
Maybe this?:
SET ANSI_NULLS ON;
SET QUOTED_IDENTIFIER ON;
GO
ALTER Procedure [dbo].[sp_MarkAsLeaver]
@username varchar(50),
@LeaverDetails varchar(100),
@RowsUpdated int output,
...
March 20, 2019 at 2:14 pm
Viewing 15 posts - 2,881 through 2,895 (of 7,609 total)