Re: [Cloud] mysql: Delete all rows older than N days

2018-04-11 Thread MarcoAurelio
Hi Jaime, - $timestamp is as follows: MMDDhhmmss (ie: 1970010100) - average rows to delete each month: a couple of hundred at most - needs: garbage collection, avoid storing old data no longer useful - automation: none, as my knowledge here is rather scarce so I'd do this by hand for now.

Re: [Cloud] mysql: Delete all rows older than N days

2018-04-09 Thread Jaime Crespo
Please share the data type of $timestamp (normaly mysql tables should use the timestamp data type, but mediawiki uses strings, requiring some conversion). Also provide how many rows you intend to delete and what are the needs (e.g. avoid large deletes- for which there are specific tools like

Re: [Cloud] mysql: Delete all rows older than N days

2018-04-07 Thread MarcoAurelio
Hi, thanks for your reply. I do too run from time to time a query like yours: "DELETE FROM logging WHERE l_timestamp < 2018020100;" for example; however I have to manually set the timestamp. Ideally we should perhaps move to have a coded garbage collector on our tool instead of doing this

Re: [Cloud] mysql: Delete all rows older than N days

2018-04-07 Thread Maximilian Doerr
That should technically work, but you want to be sure you have the timestamp column indexed. Based on what I’m seeing, it looks as if you mixed PHP in there. Here’s how my garbage collector works for my IABot interface.