MySQL Forums
Forum List  »  Optimizer & Parser

msqldump only one row per minute from a 5 row/minute database
Posted by: Adrian C
Date: February 22, 2020 12:38PM

Hello Everybody!

I spend hours on the web, searching for a solution to my problem, but I didn't find one. hope that someone can help me, because I know that is something simple.

I have a table like this: (ID-unique ID, DATETIME - timestamp, and other data)

ID DATETIME MAXTEMP SENZOR .... etc

1 2020-02-22 20:00:10 3 0
2 2020-02-22 20:00:23 3 0
3 2020-02-22 20:00:34 3 0
4 2020-02-22 20:00:45 3 0
5 2020-02-22 20:00:56 3 0
6 2020-02-22 20:01:07 3 0
7 2020-02-22 20:01:18 3 0
8 2020-02-22 20:01:31 3 0
9 2020-02-22 20:01:54 3 0
10 2020-02-22 20:02:07 3 0

As you can see, there are 5 records within 1 minute, too much data. I want to save (sqldump) one record / minute, or if its easyer, one record save,4 records skip. Since I have datetime column and unique ID, I am sure there must be a solution to this.

Appreciate any help!

Thank you!
Adrian

Options: ReplyQuote


Subject
Views
Written By
Posted
msqldump only one row per minute from a 5 row/minute database
108
February 22, 2020 12:38PM


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.