v.25.6Improvement
Setting use_skip_indexes_if_final and use_skip_indexes_if_final_exact_mode now default
Settinguse_skip_indexes_if_finalanduse_skip_indexes_if_final_exact_modenow default toTrue. Queries withFINALclause will now use skip indexes (if applicable) to shortlist granules and also read any additional granules corresponding to matching primary key ranges. Users needing earlier behaviour of approximate/imprecise results can setuse_skip_indexes_if_final_exact_modeto FALSE after careful evaluation. #81331 (Shankar Iyer).
Why it matters
This feature improves query accuracy when using theFINAL clause by leveraging skip indexes to shortlist granules and also reading additional granules based on matching primary key ranges. It addresses the issue of approximate or imprecise results in FINAL queries by defaulting to a more exact and reliable index usage.How to use it
Since these settings default toTrue, queries with the FINAL clause automatically benefit from skip indexes. Users who prefer the earlier behavior with approximate results can set use_skip_indexes_if_final_exact_mode = FALSE in the server configuration or query context after evaluation.