#### 27.12.2.1 The setup\_actors Table

[]()[]()

 The [`setup_actors`](performance-schema-setup-actors-table.html) table contains information that determines whether to enable monitoring and historical event logging for new foreground server threads (threads associated with client connections). This table has a maximum size of 100 rows by default. To change the table size, modify the [`performance_schema_setup_actors_size`](performance-schema-system-variables.html#sysvar_performance_schema_setup_actors_size) system variable at server startup.

 For each new foreground thread, the Performance Schema matches the user and host for the thread against the rows of the [`setup_actors`](performance-schema-setup-actors-table.html) table. If a row from that table matches, its `ENABLED` and `HISTORY` column values are used to set the `INSTRUMENTED` and `HISTORY` columns, respectively, of the [`threads`](performance-schema-threads-table.html) table row for the thread. This enables instrumenting and historical event logging to be applied selectively per host, user, or account (user and host combination). If there is no match, the `INSTRUMENTED` and `HISTORY` columns for the thread are set to `NO`.

 For background threads, there is no associated user. `INSTRUMENTED` and `HISTORY` are `YES` by default and [`setup_actors`](performance-schema-setup-actors-table.html) is not consulted.

 The initial contents of the [`setup_actors`](performance-schema-setup-actors-table.html) table match any user and host combination, so monitoring and historical event collection are enabled by default for all foreground threads:

```
mysql> SELECT * FROM performance_schema.setup_actors;
+------+------+------+---------+---------+
| HOST | USER | ROLE | ENABLED | HISTORY |
+------+------+------+---------+---------+
| %    | %    | %    | YES     | YES     |
+------+------+------+---------+---------+
```

 For information about how to use the [`setup_actors`](performance-schema-setup-actors-table.html) table to affect event monitoring, see [Section 27.4.6, “Pre-Filtering by Thread”](performance-schema-thread-filtering.html).

 Modifications to the [`setup_actors`](performance-schema-setup-actors-table.html) table affect only foreground threads created subsequent to the modification, not existing threads. To affect existing threads, modify the `INSTRUMENTED` and `HISTORY` columns of [`threads`](performance-schema-threads-table.html) table rows.

 The [`setup_actors`](performance-schema-setup-actors-table.html) table has these columns:

* `HOST`

   The host name. This should be a literal name, or `'%'` to mean “any host.”

* `USER`

   The user name. This should be a literal name, or `'%'` to mean “any user.”

* `ROLE`

   Unused.

* `ENABLED`

   Whether to enable instrumentation for foreground threads matched by the row. The value is `YES` or `NO`.

* `HISTORY`

   Whether to log historical events for foreground threads matched by the row. The value is `YES` or `NO`.

 The [`setup_actors`](performance-schema-setup-actors-table.html) table has these indexes:

* Primary key on (`HOST`, `USER`, `ROLE`)

[`TRUNCATE TABLE`](truncate-table.html) is permitted for the [`setup_actors`](performance-schema-setup-actors-table.html) table. It removes the rows.

