Dynamic profiles are central to the field specialization process. Runtime profiles are used in the first five steps in the Field Specialization process to identify attractive specialization opportunities, by successively narrowing down the scope to individual functions or...
Field specialization has two especially helpful attributes. First, specializations are reusable across queries. Second, specializations are independent of each other.
A specialization is applied to a specific hotspot revealed by dynamic analysis tools that collect informat...
Field specialization applies to hotspots at the routine level and sometimes even to short code segments within a routine. As an example, field specialization could be applied to a particular hot loop, minimizing the code changes required. Further, specialization can be ap...
This is like a koan: the performance benefits from field specialization are simultaneously independent of workloads used to generate that specialization and intimately aware of details of the workload it is speeding up.
Recall that field specialization generates, at compil...
While working with our customers, one common question we receive is the following: Is field specialization applied once and will it potentially cease to improve performance? Another: We have done optimizations ourselves; what else can field specialization provide?
As we work with our customers on their ever-evolving code bases, we find that new features and components added to these code bases often bring more specialization opportunities.
Our own experience on PostgreSQL supports this observation.
The first step of applying field specialization is to look for runtime hotspots with profiling tools. Once field specialization is applied to address the top few hotspot routines, their overhead typically will reduce significantly. Then we can start the field specializati...
Recall that a spiff is code added to the DBMS source that, given values of invariants known in cold code, generate specialized code (termed “speccode”) that will be called in hot code when the query is executed. How big are they?...