thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Data & Analytics · Advanced

Database Statistics

Metadata about the distribution of values in columns and indexes, used by the optimizer to estimate row counts.

Definition

Statistics include histograms, density and distinct counts. They become stale as data changes and are refreshed automatically or with UPDATE STATISTICS (SQL Server), ANALYZE (PostgreSQL) or DBMS_STATS (Oracle).

Example

UPDATE STATISTICS Sales.Orders WITH FULLSCAN;

Exam tip

After a large data load, update statistics before tuning anything else.

Related terms