November 26, 2009 at 12:55 pm
Jeff Moden (11/26/2009)
(sys.sysColumns I believe... not sure because this is 2k8).
Just sys.columns
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
November 26, 2009 at 1:42 pm
Thanks, Gail.
--Jeff Moden
Change is inevitable... Change for the better is not.
November 26, 2009 at 1:57 pm
Thanks,
I'll try the column by column compare and see how it performs.
These kind of tables, the structure ones, have very little write... lot's of read before they go to app cache, and after that they are stalled...
Just another question, don't know if it makes any sense but...
Is it possible to, within the trigger, send the inserted and deleted values to MSMQ in a message so the trigger would be assync?
Thanks,
Pedro
November 26, 2009 at 2:10 pm
Not so much MSMQ, but Service Broker sure. Question is, are you willing to put up with the massive increase in complexity and increased administrative overhead (and it is high) to get a little bit more performance? Is update performance that critical and that bad?
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
November 26, 2009 at 3:44 pm
Thanks for clearing things out... 😀
I guess the best way is to have a historical table and put the deleted row on that table and when comparison is needed get the actual version and the desired historical version and compare on the app.
The trigger would be simple, just an INSERT INTO table_history SELECT deleted.*, GETDATE() FROM deleted and get all the rows from the history table to a certain date and compare with the actual version.
This is more a kind of safeguard to our side since we have customers saying "I didn't do that. It's probably a bug on your app the removed the field..." or something like this...
With this table we can always compare all the versions of the data and give a detailed report on what was done...
Pedro
Viewing 5 posts - 16 through 19 (of 19 total)
You must be logged in to reply to this topic. Login to reply