I am planning on putting 10-15 insert triggers on a single table. Each trigger will do 3~ inserts to another table. Will this have an adverse effect on my database? I’m thinking the speed it takes to execute all the triggers may be a little slow.
The reason for this is a 3rd party peice of software logs data in a database for us. The table scheme is like so:
DateTime EquipA_Speed EquipA_Power EquipB_Speed EquipB_Power EquipC_Speed EquipC_Power
We then want to normalize this data in our own database. Our database has an Equipment table and a SignalType table (signals being power, speed etc).
My plan was have a trigger for each piece of a equipment to make it simpler and more maintainable. When a row is inserted, I need to add a row for each signal for each piece of equipment in a Signal table.
SignalID Value EquipmentID SignalTypeID
You could poll the wide table, or use service broker from the trigger to notify a decoupled process that reads the table.
Then you can have a stored that prepares/shreds the data first in temp tables or table variables first. Then starts a transaction, do your writes, commits.