counter customizable free hit

Monday, January 16, 2006

Event Scheduler

Release 5.1 of MySQL comes with a new event scheduler, this is great news and further moves the MySQL database away from just a data store, something which began with the introduction of Stored Procedures and Triggers in 5.0.

The event scheduler will allow you to run an SQL command at a specific time, this is great for maintenance purposes. It's possible to run the command a single time or set up and interval and run it multiple times. What's also great is that you can use DDL, DML and even compound statements which allows SQL/PSM syntax to handle processing as part of the command.

I'll admit to not having downloading and installing 5.1 as yet but this is definitely something I'll be using. As an Oracle user I've been using Oracle's version DBMS_JOB for a while and this looks to be as good, if not better due to the easy method of adding events.

Having said all this often in Oracle I have often preferred to use a combination of SQL*Plus and CRON due to the ability to process the output in Unix/Linux after the job has run. For those using a MySQL version other than 5.1 CRON does offer a great way of doing a similar job to the new event scheduler.

You can see an introduction to the event scheduler here.

http://dev.mysql.com/tech-resources/articles/event-feature.html

0 Comments:

Post a Comment

<< Home