Deepak Mahto covers how function volatility can affect how queries on partitioned data perform:
In one of our earlier blogs, we explored how improper volatility settings in PL/pgSQL functions — namely using
IMMUTABLE,STABLE, orVOLATILE— can lead to unexpected behavior and performance issues during migrations.Today, let’s revisit that topic from a slightly different lens. This time, we’re not talking about your user-defined functions, but the ones PostgreSQL itself provides — and how their volatility can quietly shape your query performance, especially when you’re using partitioned tables.
Click through for one example using date-based partitioning and date functions.