From the course: Database Foundations: Administration

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Reviewing system statistics

Reviewing system statistics

From the course: Database Foundations: Administration

Start my 1-month free trial

Reviewing system statistics

- [Instructor] Whenever a query request is sent to a database, the RDBMS creates an execution plan that determines how the system will fetch the requested values. The quality of the generated plan relies on having up-to-date statistics about each table. I discussed the execution plans in the third course of this series, but what we didn't touch on is how the system estimates the number of rows that'll be returned for each step in the plan. When the execution plan is being developed by the RDBMS, it needs to make some educated guesses about the values that are likely to be found in a table before it actually reads the table. It does this by reviewing the statistical distribution of a random sampling of the rows. It works something like this. Let's suppose that you have a table that has 1,000 rows. You know that 75% of the rows have the value A and 25% of the rows have a value B. This represents the statistical data…

Contents