I run a website where I need to store the information like this:
table: logs
* date (date)
* server_1 (unsigned int)
* server_2 (unsigned int)
* user_id (unsigned int)
* ip (unsigned int)
* service (enum)
* traffic (unsigned bigint)
My queries look primarliy like this:
SELECT SUM(traffic) FROM logs WHERE user_id = 8381 AND date > DATE_ADD(CURDATE(), INTERVAL -7 DAY) AND service != 'unknown'
I have a composite primary key over all the fields except traffic and an index on user_id and service
is it maby more efficient to store the traffic as a float?
Also is MyIsam a good engine or should I use innodb?
Or even another database system?
The table gets really quite big (tens of millions of rows) and is relly heavily queried.