sql - Put indexes on a table with lots of BOOL/TINYINT? -
An old mentor once asked me to index things that you can call WHERE
For use.
Should I put an index on BOOL / TINYINT
? In the table I am working in, one of them is significant amount, and often the results are filtered anywhere with 1-20 bullion conditions.
A condition in which an index can be useful on boolean fields (or other low cardinal fields) . If the values are relatively less than one (for example, 10 TRUE values out of ten million) and if you are searching for those values quite a few times then an index would be useful.
Comments
Post a Comment