# info > ANALYZE

---
type: CommandReference
command: ANALYZE
mode: man
section: 7
source: man-pages
---

## Quick Reference
- `ANALYZE;` — Collect statistics for all tables/materialized views in current database
- `ANALYZE table_name;` — Analyze a specific table
- `ANALYZE table_name (col1, col2);` — Analyze only specified columns
- `ANALYZE VERBOSE;` — Show progress messages
- `ANALYZE (SKIP_LOCKED) table_name;` — Skip table if lock cannot be acquired
- `ANALYZE (VERBOSE, SKIP_LOCKED true);` — Verbose with explicit skip locked
- `ANALYZE (VERBOSE false) table_name;` — Disable verbosity explicitly

## Name
ANALYZE — collect statistics about a database

## Synopsis
text
ANALYZE [ ( option [, ...] ) ] [ table_and_columns [, ...] ]
ANALYZE [ VERBOSE ] [ table_and_columns [, ...] ]

where option can be:
    VERBOSE [ boolean ]
    SKIP_LOCKED [ boolean ]

and table_and_columns is:
    table_name [ ( column_name [, ...] ) ]
## Options
- `VERBOSE` — Enable display of progress messages. Can be turned on/off with `VERBOSE true/false/on/off/1/0`.
- `SKIP_LOCKED` — Skip relations that cannot be locked immediately without waiting. A conflicting lock on a partitioned table causes all partitions to be skipped.
- `table_name` — Name (optionally schema‑qualified) of a table to analyze. If omitted, all regular tables, partitioned tables, and materialized views in the current database are analyzed (foreign tables are skipped unless explicitly named). For partitioned tables, both the inheritance statistics and individual partition statistics are updated.
- `column_name` — Specific column to analyze. Defaults to all columns. Only statistics for the listed columns are collected.

## Examples
sql
-- Analyze the entire current database
ANALYZE;

-- Analyze a single table with progress messages
ANALYZE VERBOSE orders;

-- Analyze only two columns of a table
ANALYZE customers (last_name, signup_date);

-- Skip locked tables, using the new parenthesized syntax
ANALYZE (SKIP_LOCKED) large_table;
## See Also
- [VACUUM(7)](http://localhost/phpMan.php/man/VACUUM/7/markdown)
- [vacuumdb(1)](http://localhost/phpMan.php/man/vacuumdb/1/markdown)
- PostgreSQL documentation: [Section 20.4.4](https://www.postgresql.org/docs/14/runtime-config-query.html), [Section 25.1.6](https://www.postgresql.org/docs/14/routine-vacuuming.html#AUTOVACUUM), [Section 28.4.1](https://www.postgresql.org/docs/14/progress-reporting.html#ANALYZE-PROGRESS-REPORTING)