Viewing 15 posts - 19,936 through 19,950 (of 49,552 total)
If the trigger needs to fire after a row is added to customer, it's an insert trigger, if fires after an insert operation. An update trigger fires after a row...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 4, 2012 at 10:18 am
The thing here is that there's not much that can cause very slow disk response other than the hardware. Doesn't have to be faulty, just slow or overused or incorrectly...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 4, 2012 at 2:26 am
Kennedy.Parker (3/3/2012)
Do we gain any internal file structure/page structure benefit by doing a schema-rebuild/data-import vs the other methods?
No.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 3, 2012 at 3:47 pm
500 000+ rows for each DB?????
That's seriously bad. Find Kimberly Tripp's article on transaction log throughput and read it.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 3, 2012 at 3:45 pm
Well you can't pass an ID to a trigger, and pulling an ID out of the inserted table into a variable is a common error when writing triggers as if...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 3, 2012 at 10:48 am
Which part of the rough sample code that I posted don't you understand?
Forget about passing customerIDs around, that's not how triggers work. The rough code I posted would be the...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 3, 2012 at 10:26 am
Please look at the rough code I gave you. I didn't use Insert .. values anywhere.
If you are writing a trigger to log inserted rows into another table you cannot...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 3, 2012 at 10:10 am
See my previous post, specifically
Typically, if you want to create a logging trigger, it will look something like the following.
CREATE TRIGGER....
AS
INSERT INTO <logging table name> (<columns to insert>)
SELECT <columns> from...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 3, 2012 at 9:57 am
lfc8ynwa (3/3/2012)
DECLARE @CustomerID intSelect @CustomerID = CustomerID From inserted
The first problem is that you are assuming there will only ever be one row inserted at a time. What's going to...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 3, 2012 at 8:46 am
Filegroups group data files together for the purpose of table storage. Log files don't store tables or indexes, so they can't logically be part of a filegroup
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 3, 2012 at 8:41 am
Not just because of the isolation level. Read committed releases the shared locks on rows read after the read completes, but also read locks are shared, so two sessions can...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 3, 2012 at 4:58 am
None whatsoever.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 3, 2012 at 4:44 am
Please post new questions in a new thread. This is not a single problem with a single solution.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 2, 2012 at 3:02 pm
It's like with a procedure.
CREATE PROCEDURE ... doesn't define a statement block, but this prints out all the print statements
CREATE PROCEDURE Talkative AS
Print '1'
Print '2'
print '3'
GO
DECLARE@MyIntINT = 1
IF@MyInt = 1
...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 2, 2012 at 1:31 pm
Investigate the poor throughput and high latency on the log drive. If that's a SAN, look at the SAN diagnostics, check the switch usage stats, etc.
Also maybe check your transaction...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 2, 2012 at 1:28 pm
Viewing 15 posts - 19,936 through 19,950 (of 49,552 total)