Bible Trivia
2010-08-04 01:58:44 UTC
Hello-
Im trying to design a database to handle history for
individual users, potentially thousands or more down the
line. i want to limit the number of inserts into a table to
10 total rows, no matter when they insert single elements.
What Im really wanting is a MySQL 'queue' in a way.
When 1 row is inserted, the last row gets discarded.
If this isnt possible currently, does it 'cost' me a lot
to do an INSERT and then a DELETE all at once
rather than running cron jobs at night to do this?
Im concerned that if the DB grows larger and larger,
the cron jobs will take longer and longer and slow down
the entire performance. The DB is a 24 hr a day DB,
so there isnt really a 'good' time to run cron jobs.
Thanks...Im still kinda new to MySQL and DB's
Im trying to design a database to handle history for
individual users, potentially thousands or more down the
line. i want to limit the number of inserts into a table to
10 total rows, no matter when they insert single elements.
What Im really wanting is a MySQL 'queue' in a way.
When 1 row is inserted, the last row gets discarded.
If this isnt possible currently, does it 'cost' me a lot
to do an INSERT and then a DELETE all at once
rather than running cron jobs at night to do this?
Im concerned that if the DB grows larger and larger,
the cron jobs will take longer and longer and slow down
the entire performance. The DB is a 24 hr a day DB,
so there isnt really a 'good' time to run cron jobs.
Thanks...Im still kinda new to MySQL and DB's