adspace
There is a trigger defined for INSERT operations on a
table, in an OLTP system. The trigger is written to
instantiate a COM object and pass the newly insterted rows
to it for some custom processing. What do you think of this
implementation? Can this be implemented better?
Answer Posted / swapna
Instantiating COM objects is a time consuming process and
since you are doing it from within a trigger, it slows down
the data insertion process. Same is the case with sending
emails from triggers.
This scenario can be better implemented by logging all the
necessary data into a separate table, and have a job which
periodically checks this table and does the needful.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
do you know how to configure db2 side of the application? : Sql server database administration
How raid can influence database performance?
What are the pros and cons of putting a scalar function in a queries select list or in the where clause?
If you're given a raw data table, how would perform etl (extract, transform, load) with sql to obtain the data in a desired format?
How to remove duplicate rows from table except one?
What is self contained sub query?
Does view occupy space?
How to convert numeric expression data types using the cast() function?
How to enter binary string literals in ms sql server?
This question asked during interview, 2) At the end of each month, a new table is created for each bank that contains monthly metrics consolidated at the account level. The table naming convention is bankX_YYYYMM where X represents the numeric designation of the bank and YYYYMM indicates the 4 digit year and 2 digit month. The tables contain the following fields: name data type description account text account number registered boolean indicates whether the account is registered num_trans integer number of transactions made during the time period spend numeric(9,2) total spend during the time period a) Write a SQL query that will display the total number of transactions and total spend for "Bank1" during the 4th quarter of 2009. b) Write a SQL query that will display the total number of transactions and total spend at "Bank1" and "Bank2", broken out by registered vs. non-registered accounts, during January 2010 not sure what is correct answer and how to solve?
What are different types of constraints?
What are the different subsets of sql?
How do I create a trace in sql server?
If any stored procedure is encrypted, then can we see its definition in activity monitor?
What is standby servers? Explain types of standby servers.