Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Compile Maria database very 30 days interval

Posted on 2015-01-29
1
Medium Priority
?
158 Views
Last Modified: 2015-02-13
Hi , Good day,

I am getting raw data into my database (table) every second and filling up my database - no issue on that part. I want to compile my data every 30 days interval automatically example date from 15/jan ~ 14/feb and so on. Is that possible in Maria db
0
Comment
Question by:TITO2009
1 Comment
 
LVL 43

Accepted Solution

by:
pcelba earned 2000 total points
ID: 40578380
Yes, this is possible. You may use ADDDATE or DATE_ADD function to calculate the date + 30 days.

More info: https://mariadb.com/kb/en/mariadb/date-and-time-functions/

To execute the compilation every 30 days just CREATE EVENT: https://mariadb.com/kb/en/mariadb/events/

More info: https://mariadb.com/kb/en/mariadb/create-event/

Your compilation will be more complex than one simple statement so I would recommend to create and call Stored Procedure.

More info: https://mariadb.com/kb/en/mariadb/stored-procedures/
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently I was talking with Tim Sharp, one of my colleagues from our Technical Account Manager team about MongoDB’s scalability. While doing some quick training with some of the Percona team, Tim brought something to my attention...
Creating a Cordova application which allow user to save to/load from his Dropbox account the application database.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question