I have to query a table of stock prices that includes a column 'split_coefficient' where split_coeffieint is almost always 1.0, but very occasionally is something other than that: 2.0, 0.5, etc.
I have tried adding a partial index on split_coefficient where 'split_coefficient != 1.0', but postgres does not use it in its query plan. Also tried, just a normal index on split_coeffient, which was not used either.
I typically query 'select * from fmvs where commodity_id == <SOME_ID> AND date BETWEEN and AND split_coefficient <> 1.0'.
I have an index on commodity_id, and date. What is the best way to index on split_coeficient to speed up the query.