MySQL Forums
Forum List  »  Newbie

Scheduled Job to write data to CSV then delete that data
Posted by: Bob Lomax
Date: September 06, 2018 03:59AM

Hi, I'm new to MySQL 8, although I used a couple of other RDBMS a few years ago.

I have an app that is writing performance data to a few tables on a very regular basis. I need to get/extract the perf data out of a couple of tables in MySQL on a regular schedule into CSV files (e.g. every 10 minutes). I want to either mark or delete that data after an extract has run. The data is time sensitive so I want to avoid duplicates in my extract or gaps where I missed stuff. Perhaps a daily 'Purge' should also run on marked records.

Looking for advice on the best way to acheive the above.

General questions:
Are SQL queries best with MySQL scheduled tasks, or is it better to script this?
Do I need to be careful about record locking as the tables have data coming in regularly?
General hints and tips, or anyone have a similar example to share?

Much appreciated,

Options: ReplyQuote

Written By
Scheduled Job to write data to CSV then delete that data
September 06, 2018 03:59AM

Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.