# Performance Schema rwlock\_instances Table

The `rwlock_instances` table lists all read write lock (rwlock) instances that the Performance Schema sees while the server is executing. A read write is a mechanism for ensuring threads can either share access to common resources, or have exclusive access.

The [performance\_schema\_max\_rwlock\_instances](/docs/server/reference/system-tables/performance-schema/performance-schema-system-variables.md#performance_schema_max_rwlock_instances) system variable specifies the maximum number of instrumented rwlock objects.

The `rwlock_instances` table contains the following columns:

| Column                        | Description                                                                           |
| ----------------------------- | ------------------------------------------------------------------------------------- |
| NAME                          | Instrument name associated with the read write lock                                   |
| OBJECT\_INSTANCE\_BEGIN       | Address in memory of the instrumented lock                                            |
| WRITE\_LOCKED\_BY\_THREAD\_ID | THREAD\_ID of the locking thread if locked in write (exclusive) mode, otherwise NULL. |
| READ\_LOCKED\_BY\_COUNT       | Count of current read locks held                                                      |

<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-rwlock_instances-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.
