In RDBMS how does Statistical Data Get Populated?

RDBMS stores statistical information for every relation in the database using the DDL used to create the relations (number of rows, size of rows, block size and factores (for optimal storage), as well as how distinct values for each for each attribute).  Stats about indices, etc.

Each time a DDL command is issued (such as alter table structure) stats gets updated, also with every DML command the stats gets updated (update command).

This is generally from the RDBMS and in real life applications stats are also maintained about data usage and this information is used for Query Optimization and to calculate the cost of a query. 

Leave a Reply