Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can this be used to enforce a temporal limit on data? That is, if the check is for time to be within 24 hours of now will it purge older than 24 hours data as time progresses? My gut tells me no, but my gut is often wrong when it comes to databases.


if I understand you correctly, this type of thing is implemented by partitioning by hour in a day and then having a janitor process drop tables that are older than 24 hours.


ALTER TABLE .. TRUNCATE PARTITION should be much faster than deleting as well. At least it is in MySQL.


you can in oracle, and I believe db2. It's called range partitioning.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: