This is the MySQL table structure that I have:
itemID (BIGINT) userID (BIGINT) wasAdded (DATETIME)
I need to get the number of items introduced in the current day, by the X userID
What would be the most efficient way to do this?
Thanks
Related Questions
No related questions found
The best way would be to add an index that covers
userIDandwasAdded, then you can doThis shouldn’t even need to read from the table, as all the data it needs is in the index.