| 1 |
|
| 2 |
# Add to users to the setup_actors table: one enabled, and one disabled |
| 3 |
INSERT INTO performance_schema.setup_actors |
| 4 |
VALUES ('localhost', 'foo', '%', 'YES', 'YES'), |
| 5 |
('localhost', 'bar', '%', 'NO', 'NO'); |
| 6 |
|
| 7 |
# Disable all but a few instruments (reduces output as well) |
| 8 |
# It is not possible to disable memory/performance_schema/% |
| 9 |
# so don't even try. |
| 10 |
UPDATE performance_schema.setup_instruments |
| 11 |
SET ENABLED = 'NO' |
| 12 |
WHERE NAME NOT LIKE 'memory/performance_schema/%' |
| 13 |
AND NAME NOT LIKE 'stage/innodb/%' |
| 14 |
AND NAME NOT LIKE 'statement/com/%' |
| 15 |
AND NAME <> 'idle'; |
| 16 |
|
| 17 |
# Disable the history_long consumers: |
| 18 |
UPDATE performance_schema.setup_consumers |
| 19 |
SET ENABLED = 'NO' |
| 20 |
WHERE NAME LIKE '%\_history\_long'; |
| 21 |
|
| 22 |
# Disable some of the background threads (including those that differ between unix like and Windows systems): |
| 23 |
UPDATE performance_schema.threads |
| 24 |
SET INSTRUMENTED = 'NO' |
| 25 |
WHERE NAME LIKE 'thread/innodb/srv\_%' |
| 26 |
OR NAME LIKE 'thread/innodb/trx\_%' |
| 27 |
OR NAME LIKE '%con\_%' |
| 28 |
OR NAME LIKE '%signal_handler%' |
| 29 |
OR NAME LIKE '%thread_timer_notifier'; |
| 30 |
|
| 31 |
# Show limited info (no thread or instrument info) |
| 32 |
CALL sys.ps_setup_show_enabled(FALSE, FALSE); |
| 33 |
|
| 34 |
# Should show instrument data, but not thread info |
| 35 |
CALL sys.ps_setup_show_enabled(TRUE, FALSE); |
| 36 |
|
| 37 |
# Should show thread info, but no instrument data |
| 38 |
CALL sys.ps_setup_show_enabled(FALSE, TRUE); |
| 39 |
|
| 40 |
# Should show all info |
| 41 |
CALL sys.ps_setup_show_enabled(TRUE, TRUE); |
| 42 |
|
| 43 |
# Clean up |
| 44 |
-- source ../include/ps_setup_reset_to_default_cleanup.inc |