Viewing 15 posts - 2,341 through 2,355 (of 7,608 total)
It's both reasons that it's faster. To pretend that the shared locks on rows don't take any time is just not true. It may be small overhead, but...
August 5, 2020 at 9:16 pm
Great, glad it helped.
Btw, note that you must ALWAYS use the alias in the UPDATE statement when using a join in an UPDATE.
--WRONG!!
UPDATE Brs --<<--WRONG!! MUST be (alias) B
SET HrsHKB...
August 5, 2020 at 5:03 pm
Thanks all.
Yeah, normally I too try to avoid loops, but in this case, it's probably better just to loop.
For absolute max efficiency, you can uncomment the UPDATE #bundles statement, although...
August 5, 2020 at 4:53 pm
Yes, it works, it's easy enough to write code to prove it:
;with tbltest as (select cast('ab012' as varchar(5)) as TestNumber) select * from tblTest where TestNumber = cast(20012 as varchar(5))
Just...
August 5, 2020 at 4:50 pm
August 4, 2020 at 6:03 pm
Thus, the only real issue is dirty reads. So, again, if dirty reads would cause you a problem, DON'T use NOLOCK. If not, you can consider it.
But...
The biggest...
August 4, 2020 at 5:05 pm
August 4, 2020 at 4:55 pm
NOLOCK is NOT a bad thing when used properly, i.e., dirty reads are acceptable for that query (or you know that dirty reads aren't going to recur). There has been...
August 4, 2020 at 4:43 pm
I'd forget recursion for this for now, maybe try a more "loopy" approach:
USE tempdb;
DROP TABLE IF EXISTS dbo.objectLinks;
CREATE TABLE dbo.objectLinks (
UniqueID int IDENTITY(1,1) NOT...
August 4, 2020 at 4:13 pm
I don't see a more efficient way. The speed problem may be that it ise UPDATEing every row of the Brs table, since there's no join to it in the...
August 3, 2020 at 3:14 pm
I thought LEAD / LAG were added in SQL 2012?!, although I'm not sure how useful they'd be here anyway.
July 31, 2020 at 10:31 pm
DROP TABLE IF EXISTS #testdata;
CREATE TABLE #testdata ( description nvarchar(max) NULL, new_description nvarchar(max) NULL );
INSERT INTO #testdata ( description) VALUES
('Hyperlink[https://OldURL/Site/location.doc?andnowuneededstuff]'),
...
July 31, 2020 at 10:06 pm
Not 100% sure what you are ultimately trying to do, but maybe something like this:
...
SET DESCRIPTION = REPLACE(CAST(DESCRIPTION AS nvarchar(max)), N'.doc?', N'?web=1')
...
July 31, 2020 at 6:04 pm
It's vital to insure that these backups are securely encrypted. Highly sensitive data going to a removal drive would be a very bad practice otherwise.
July 30, 2020 at 9:26 pm
Viewing 15 posts - 2,341 through 2,355 (of 7,608 total)