5 ms·
Was coming here to post that. Being able to create indexes based on the results of a function is the solution to so many problems. You can even index the resul
by brightball 9y ago
Was coming here to post that.
Being able to create indexes based on the results of a function is the solution to so many problems. You can even index the result of an XPath function on a huge, compressed XML document.
- jaggederest 9y agoPartial functional indexes are amazing. You can create an index that not only elides execution of the function, but automatically only includes the subset where that function would be relevant. Makes the index smaller, to boot. create index repo_name_lower on repos(LOWER(name)) where name IS NOT NULL;
- combatentropy 9y agoPartial unique-constraint indexes are useful too