Optimizing YugabyteDB Queries With Immutable Functions And Indexing
Optimize YugabyteDB queries by creating an immutable `GMT_HH24MI` function & indexing extracted data. Push down predicates for Index-Only Scan & boost performance.
This is inspired by Henrietta Dombrovskaya's recent post (Can we use this index, please? – Why not?), which reveals an SQL optimization method that requires the user to rewrite the query in PostgreSQL. This is also a tiny counter-example to my general assertion that seeking the fully covering index, the Index Only Scan, isn't always necessary, as I explained in Covering Index nuances: which columns to cover (WHERE, ORDER BY, LIMIT, SELECT)? In this scenario, with PostgreSQL, an Index-Only Scan was necessary to optimize the filtering, even with an index that includes all columns utilized by th...