Viewing 15 posts - 4,156 through 4,170 (of 7,597 total)
Look at the missing index stats and the index usage stats to help determine a useful clustered index. Only if no useful clustering key exists, and remember to consider...
September 1, 2016 at 1:40 pm
CELKO (9/1/2016)
]I've found myself creating loads of functions recently which are typically used for one specific task and rarely required again.
This is not how we intended SQL to be...
September 1, 2016 at 12:35 pm
Rollbacks very often take more time than the initial modification. They are only very quick if all the pages are still in memory.
Are there nonclustered index(es) on the table?...
September 1, 2016 at 11:10 am
TheSQLGuru (8/31/2016)
ScottPletcher (8/31/2016)
TheSQLGuru (8/31/2016)
August 31, 2016 at 2:55 pm
TheSQLGuru (8/31/2016)
August 31, 2016 at 1:20 pm
TheSQLGuru (8/31/2016)
ScottPletcher (8/31/2016)
TheSQLGuru (8/31/2016)
ScottPletcher (8/31/2016)
TheSQLGuru (8/31/2016)
ScottPletcher (8/31/2016)
Tarun Jaggi (8/29/2016)
I have a table which has million rows and database is set under RCSI. The table has a clustered primary key...
August 31, 2016 at 1:10 pm
TheSQLGuru (8/31/2016)
ScottPletcher (8/31/2016)
TheSQLGuru (8/31/2016)
ScottPletcher (8/31/2016)
Tarun Jaggi (8/29/2016)
I have a table which has million rows and database is set under RCSI. The table has a clustered primary key on Column1...
August 31, 2016 at 12:05 pm
TheSQLGuru (8/31/2016)
ScottPletcher (8/31/2016)
Tarun Jaggi (8/29/2016)
I have a table which has million rows and database is set under RCSI. The table has a clustered primary key on Column1 and a...
August 31, 2016 at 11:49 am
Tarun Jaggi (8/29/2016)
I have a table which has million rows and database is set under RCSI. The table has a clustered primary key on Column1 and a non-clustered index...
August 31, 2016 at 9:55 am
(1) not sure what that means.
(2) no. a table can have many nonclustered indexes.
(4) presumably they mean hierarchy ids, but can't tell for sure, the q is vague enough they...
August 31, 2016 at 9:51 am
Gregory Hart (8/29/2016)
IF OBJECT_ID('tempdb..##fn_CORP_Divide') IS NOT NULL DROP PROCEDURE ##fn_CORP_Divide;
CREATE...
August 31, 2016 at 9:48 am
I'd prefer to just add one day to the end date when needed. That seems much "cleaner" than dual 3ms adjustments:
SELECT
start_time, end_time, DATEDIFF(MINUTE, start_time,...
August 31, 2016 at 9:43 am
Add an extra join condition so you only get a single occurrence:
...
INNER JOIN (SELECT ConsumerID, ConsumerAccountID
FROM Consumer
WHERE ConsumerType = 'S') s ON p.ConsumerAccountID = s.ConsumerAccountID
AND...
August 26, 2016 at 2:18 pm
Did you look at the code I posted?
August 25, 2016 at 10:55 am
Rather than literal strings of spaces, I recommend using SPACE(), just for readability:
/*CREATE FUNCTION ...*/
SELECT REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(LTRIM(RTRIM(@Text)),
SPACE(33), ' '),
SPACE(17), ' '),
SPACE(9),...
August 25, 2016 at 9:50 am
Viewing 15 posts - 4,156 through 4,170 (of 7,597 total)