Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Use Trigger/Procedure for long program?
Message
 
 
À
08/06/2010 14:20:36
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
01467976
Message ID:
01467978
Vues:
40
I think reading this long link may be beneficial for you http://www.learn-mysql-tutorial.com/Transactions.cfm

>Hello Everybody.
>
>I know this is the SQL Server section (my question is regarding MYSQL) , but I hope that the MYSQL is close enough to the SQL Server in regards to my question that I can post this here.
>
>I am relatively new to MySQL and have a behavior or structural question.
>
>I am in the process of writing a php website with a MySQL db layer. Here is the scenario:
>
>User enters some data which needs to start a routine based on the data entered and can run from just a view seconds to hours. This routine needs to update some records in the same table and in other tables. This routine also needs to run separately from the web-user who entered the data. There are other users who may also enter data and need to start that routine (or at least check if the routine is running already).
>
>I was thinking to have php update the table, therefore start an after trigger. But I don't think the long running trigger will allow other modifications to the table (not the same record). Is this correct?
>
>Then I was thinking that the trigger could call a stored procedure, but I think a proc is just an extension of the trigger and would cause the same effect. How about that - is that correct?
>
>A windows scheduler or a unix cron job would do it by checking the status of that table, but i don't like that because i don't trust that solution too much and it would be slower.
>
>What is the correct way of doing this? Is any of the above mentioned ways the correct way? If yes, could you please elaborate on how the architecture of MySQL handles that specifically in regards with the user maybe disconnecting and the routing will still run.
>
>Thank you for your help in advance!
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform