Re: Information wanted on stored procedures and triggers
Posted in 1994
Calvin Ng (calvinng@technet.sg) wrote: : While we're on this subject, what about making use of the trigger mechanism : to send 'messages' to the client?? One of the application is constantly : polling the database server to check a particular field, it is as : frequent as once per second. That's why someone suggested that it might be : more efficient if we use the trigger mechanism to notify the client : application of a change instead of the constant polling that is happening : now. How about implementing this through a trigger that calls a stored procedure that calls another routine which sends the message to the client? Implementing the trigger and the stored procedure is easy, but sending the message to the client might be more difficult. I suggest you make yourself familiar with IPC (inter-process-communication); using signals, sockets or semaphores comes to mind. Whatever you do, it will most likely give you a lot better performance and reduced system load than the polling mechanism you are using now. Hope this helps, Richard -- +----------------------------+-------------------------------------------+ | Dr. Richard Spitz | INTERNET: spitz@ana.med.uni-muenchen.de | | EDV-Gruppe Anaesthesie | Tel : +49-89-7095-3421 | | Klinikum Grosshadern | FAX : +49-89-7095-8886 | | 81366 Munich, Germany | | +----------------------------+-------------------------------------------+