3 ms·
Really seems like you don’t know what sargable means (and didn’t bother to find out if this is your reply).
by haimez 6y ago
Really seems like you don’t know what sargable means (and didn’t bother to find out if this is your reply).
- fastball 6y agoI think it might be the other way around.
- epr 6y agoNo, its pretty clear from reading his entire response that he understands exactly what sargable means. "just use indexes properly" is pretty ambiguous, but the rest of his comment provides context. It doesn't make much sense to me to be indexing on fn(x) for predicates unless an alternative sargable predicate is too complex or not possible, but that doesn't mean that it's never the best solution.
- candu 6y ago> unless an alternative sargable predicate is too complex or not possible... As you note, functional indexes can sometimes be the best solution - some common examples: when working with different geospatial projections in PostGIS; when building a full-text index using `to_tsvector`. For anyone who works with relational databases that support this, definitely a good tool to have in your toolkit!