Timeline for Subtract values in same column from 2 different dates in same Mysql table
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 19, 2019 at 10:45 | vote | accept | Acidon | ||
Mar 19, 2019 at 10:20 | comment | added | Akina | @Acidon what column should I put index on to optimize the query speed? It is difficult to answer. If items count is not too large maybe the index by date is enough, else the index by (date, item) may be more suitable. If record size is large (there is a lot of non-shown fields) maybe the index by (date, item, likes) will be the best. Test in practice. | |
Mar 19, 2019 at 9:40 | comment | added | Acidon | It works great! Before I accept, what column should I put index on to optimize the query speed? | |
Mar 19, 2019 at 7:44 | history | answered | Akina | CC BY-SA 4.0 |