Database entries existence depends on time / boolean value of a field changed automatically
- by lisak
Hey,
I have this situation here.
An auction system listing orders that are "active" (their deadline didn't occur yet)
There is a lot of orders so it is better to have a field "active" instead of listing them based on time queries
I'm not a database expert, just a user. What is the best way to implement this scenario ?
Do I have to manually check the "deadLine" field and change "active" status every once in a while ?
Is Mysql able to change the field automatically ?
How demanding are queries of type "select orders where "deadline" has passed "
Do I need to use TIMESTAMP (long data type of number of milisecond since UTC epoch time or DATETIME for the queries to the database to be more efficient ?
Finally I have to move old order entries to a different backup table .