Sobes.tech
Middle

What is the purpose of statistics in DBMS?

sobes.tech AI

Answer from AI

Statistics in a DBMS are needed for query optimization. They contain information about data distribution in tables and indexes: number of rows, unique values, value distribution in columns, etc.

The query optimizer uses statistics to choose the most efficient execution plan — for example, which index to use, how to join tables, in what order to filter data.

Without up-to-date statistics, the DBMS may select a suboptimal plan, leading to slower query performance. Therefore, regular updating of statistics is an important part of database administration.