Viewing 15 posts - 7,171 through 7,185 (of 8,416 total)
Bob,
Good point - though you can add 'WITH TIES' to my TOP (1)...
Paul
September 6, 2009 at 10:35 pm
Heh - because the whole thing was kinda jokey - a bit of fun for an otherwise fairly tedious Monday at work.
I agree with what you say about the quirkiness...
September 6, 2009 at 10:32 pm
For larger tables, with a useful index on endDate, this may be even faster than the ROW_NUMBER version:
SELECT TOP (1)
T1.endDate,
...
September 6, 2009 at 7:56 pm
Marcin Gol [SQL Server MVP] (9/6/2009)
select * from sys.databases
where DATEPART(year,create_date) = 2003
will be very slow (index scan is required here)
There is an interesting case where this isn't true (though...
September 6, 2009 at 7:45 pm
As Barry said, a ROLLBACK undoes all changes - including the actions performed by the trigger.
You can do imaginative stuff with table variables, but I'm not going down that track...
September 6, 2009 at 7:31 pm
The redoubtable G2 has two SSC articles on auditing which you may find rather interesting:
http://www.sqlservercentral.com/articles/Auditing/63247/
http://www.sqlservercentral.com/articles/Auditing/63248/
Paul
September 6, 2009 at 7:29 pm
Jeff Moden (5/17/2009)
September 6, 2009 at 7:24 pm
In case you guys think I'm cheating by changing the nullability of the id column, this version is a true replacement, and is just as fast:
SET NOCOUNT ON;
-- Conditional drops
IF...
September 6, 2009 at 7:23 pm
Hey Jeff & Flo,
Just a couple of things... 🙂
1. This isn't a true 'quirky' update unless there's a clustered index to determine the order of the ID assignment. ...
September 6, 2009 at 7:21 pm
Also check that you are trying to connect using a protocol that the server is listening on (named pipes or TCP/IP).
September 6, 2009 at 5:48 pm
It would be good to see some example code for this one.
I wonder if shared (global) temporary tables are being used...? (Just one possible cause from many)
September 6, 2009 at 5:45 pm
Marcin Gol [SQL Server MVP] (9/6/2009)
exec [dbo].[sp_BackupAllFull]@MarkName nvarchar(8),
@BackupPath nvarchar(128),
@TimeStamp datetime = NULL,
@UseLocalTime bit=0
if you are trying to pass less parameters then procedure require and you omit...
September 6, 2009 at 5:33 pm
A great approach to performance optimization can be found in the following TechNet article (waits and queues):
It gives great detailed advice and includes scripts and other goodies. I recommend...
September 6, 2009 at 4:44 pm
Viewing 15 posts - 7,171 through 7,185 (of 8,416 total)