# Performance Schema hosts Table

## Description

The `hosts` table contains a row for each host used by clients to connect to the server, containing current and total connections.

The size is determined by the [performance\_schema\_hosts\_size](/docs/server/reference/system-tables/performance-schema/performance-schema-system-variables.md#performance_schema_hosts_size) system variable, which, if set to zero, will disable connection statistics in the hosts table.

It contains the following columns:

| Column               | Description                                                                                                      |
| -------------------- | ---------------------------------------------------------------------------------------------------------------- |
| HOST                 | Host name used by the client to connect, NULL for internal threads or user sessions that failed to authenticate. |
| CURRENT\_CONNECTIONS | Current number of the host's connections.                                                                        |
| TOTAL\_CONNECTIONS   | Total number of the host's connections                                                                           |

## Example

```sql
SELECT * FROM hosts;
+-----------+---------------------+-------------------+
| HOST      | CURRENT_CONNECTIONS | TOTAL_CONNECTIONS |
+-----------+---------------------+-------------------+
| localhost |                   1 |                45 |
| NULL      |                  20 |                23 |
+-----------+---------------------+-------------------+
```

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/reference/system-tables/performance-schema/performance-schema-tables/performance-schema-hosts-table.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
