3 ms·
I haven't checked if this works in mysql, but in postgres I would certainly reach for an index on the computed values, which it supports. Index the thing you'r
by mdpye 3y ago
I haven't checked if this works in mysql, but in postgres I would certainly reach for an index on the computed values, which it supports.
Index the thing you're querying on...
- berkle4455 3y agoMySQL 8+ also supports functional indexes
- aarondf 3y agoTotally agree! From the article: > The optimal indexing strategy always depends on the application, but in general, it's best to have indexes on the conditions you are frequently querying against. [...] This makes redundant conditions useful for queries that are only sometimes run or where indexes can't be easily added to the main conditions.