September 18, 2007 at 2:27 pm
net,
I've got a trigger on one of my tables which processes inserted data in join with data from 4 other tables and 17 views. Then it populates "result" table with processing results.
It takes 0.2s to process 600 rows on single CPU single HDD server.
Not sure if any application could give a timeout here.
Only badly written triggers create problems.
_____________
Code for TallyGenerator
September 18, 2007 at 5:44 pm
... or, you can throw hardware at the problem ... r-i-g-h-t...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 18, 2007 at 7:13 pm
That's why I always insist on making DEV server the weakest one.
_____________
Code for TallyGenerator
September 18, 2007 at 8:27 pm
Heh... you did that, too, huh?
--Jeff Moden
Change is inevitable... Change for the better is not.
September 19, 2007 at 7:50 am
I wished I could do that too, but the load on my Dev servers is *significant* and all the client side code is full of timeouts settings
* Noel
September 19, 2007 at 2:38 pm
Hello,
I have not tested it yet, but agreed with you, the only problem is that triggers are not only on 1 table but on lots of table, this may affect performance.
It will see later on
Thank
September 19, 2007 at 5:18 pm
Net, you probably did not get the point in my initial post.
Trigger must just record PKs of the rows affected by changes.
It must affect just single "trace" table.
Your updates must be be performed independently from another SP.
"Trace" table will just tell to the SP which rows were changed since last run to avoid excessive table scans and re-scans.
Of course, after SP completed it's task it must clear "trace" table from PKs it used for updates.
_____________
Code for TallyGenerator
September 19, 2007 at 6:03 pm
I know... preaching to the choir but I have to say it... Putting a better server on the dev side may not help that problem...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 24, 2007 at 2:46 pm
Hello,
thank to everybody.
My problem is that there are lots of tables and only updated and new data must be moved to the destination tables.
To detect any changes or insert row for every table I have to create a trigger for each table. Each triggers fill a table with pk new or updated (In this way I know only wich row for each table must be selected).
With too many tables and triggers application hold on.
Without trigger the application work fine
Please, any contribution is desidered.
Thank
September 24, 2007 at 4:25 pm
I guess your problem is terrible design.
Can you post DDL for your "many tables" to give us an idea what is it about.
And post one of your triggers. I'm pretty sure it's done wrong.
_____________
Code for TallyGenerator
September 24, 2007 at 4:38 pm
Sergiy (9/24/2007)
I guess your problem is terrible design.Can you post DDL for your "many tables" to give us an idea what is it about.
And post one of your triggers. I'm pretty sure it's done wrong.
Heh! You always were good at getting right to the heart of the problem 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
September 25, 2007 at 8:07 am
Hello,
the database was built years ago by others people, tables to be check are +/- 100.
I cannot modify anything about this database and anyone cannot modify the application.
I was asked to move data to new database. Because I would like to avoid to move data already "moved", I thought to add trigger for each table, but here the problem.
About ddl for tables, sorry I cannot to distribute to external peolpe.
If anyone can find a solution to this issue he is very welcome.
Thank
September 25, 2007 at 2:33 pm
net,
terrible design remains terrible design regardless who and when has done it.
If you need to do 100 tables you need 100 triggers, one extra field in your tracing table "SourceTableID" and extra table to hold the list of those "Source Tables".
And question remains the same: what makes your trigger(s) slow?
_____________
Code for TallyGenerator
Viewing 13 posts - 16 through 27 (of 27 total)
You must be logged in to reply to this topic. Login to reply