Q95-squared , a tuple of singular metrics to define histogram quality for a database system
Parag Paul, Manas Sharma · 2019
Query optimizers are used in database management systems(DBMS) to create a compilation plan that is used by the execution engine of the DBMS to run a structured query language(SQL) like query. Compilation plans are built based on physical manifestation of logical operators and optimal join orders from a tree of joins based on cardinality estimations derived from statistics stored for the relations and their attributes involved in the query. In this paper we are defining a new metric tuple called q95 - squaredas a means of representing the quality of the histogram generated by the statistics creation process implemented by the DBMS. No single metric successfully defines the quality of the histogram generated and norms such l2have been traditionally used to define a numeric metric to describe the quality of the statistics that the optimizer will be relying upon to create a compilation plan. For production systems that employ multiple strategies to generate statistics, it becomes incumbent on the system to define a quantitative measure of the quality of the histogram generated for it to tune its requirements in a way that the optimal process is identified or chosen during the actual execution of a particular workload or system under test.