Query optimization is an important phase in query processing for relational databases. Query optimizers depend on table statistics to estimate the cost of the query plan. Stale statistics, resulting from frequently changing data, can result in a poor choice of query plan. Maintaining updated statistics in distributed SQL databases often poses challenges as keeping track of changes in partitioned data is not trivial. In this context, we present a novel approach for automatic collection of statistics for distributed SQL databases. We have implemented our solution on YugabyteDB, which currently requires manual generation of statistics by running a command. We present results from experiments demonstrating the efficacy of the proposed solution in dynamic databases. We also illustrate the effectiveness of the plans generated by this solution on the TPC-H dataset. Besides, our solution reduces the overhead of calculation of statistics by the nodes serving write queries.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

A Novel Approach for Automatic Global Statistics Collection in Distributed Database Systems

  • Sai Sadashiva Kundurmutt,
  • R. K. N. Sai Krishna,
  • Mahendrakar Srinivasarao,
  • M. S. Srinath,
  • Ravi Mukkamala

摘要

Query optimization is an important phase in query processing for relational databases. Query optimizers depend on table statistics to estimate the cost of the query plan. Stale statistics, resulting from frequently changing data, can result in a poor choice of query plan. Maintaining updated statistics in distributed SQL databases often poses challenges as keeping track of changes in partitioned data is not trivial. In this context, we present a novel approach for automatic collection of statistics for distributed SQL databases. We have implemented our solution on YugabyteDB, which currently requires manual generation of statistics by running a command. We present results from experiments demonstrating the efficacy of the proposed solution in dynamic databases. We also illustrate the effectiveness of the plans generated by this solution on the TPC-H dataset. Besides, our solution reduces the overhead of calculation of statistics by the nodes serving write queries.