hi guys! i was thinking at maria-discuss, and i have a new "feature request" to mariadb DELETE statment, that's the OFFSET clausule, like sqlite

my idea is...
i have a table with history about for example temperature, and i will only record last 5000 records, my idea is execute a 'cleanup' for example every day

instead of:
select date_time from history where channel=1234 order by date_time desc limit 1 offset 5000

delete from history where channel=1234 and data_time<value from previous query

i was considering something like

delete from history where channel=1234 order by date_time desc limit 99999999999 offset 5000

what you think about this?



--
Roberto Spadim
SPAEmpresarial
Eng. Automação e Controle