# Sys Schema Stored Procedures

- [create\_synonym\_db](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-procedures/create_synonym_db.md): The create\_synonym\_db stored procedure creates a new database that contains views mirroring all tables from a source database, useful for creating aliases.
- [optimizer\_switch Helper Functions](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-procedures/optimizer_switch-helper-functions.md): These helper functions allow you to easily enable or disable specific optimizer\_switch flags for the current session.
- [ps\_trace\_statement\_digest](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-procedures/ps_trace_statement_digest.md): This procedure traces a specific statement digest in the Performance Schema, capturing details about its execution for performance analysis.
- [ps\_trace\_thread](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-procedures/ps_trace_thread.md): The ps\_trace\_thread procedure captures a trace of Performance Schema instrumentation for a specific thread and dumps it to a .dot formatted graph file.
- [ps\_truncate\_all\_tables](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-procedures/ps_truncate_all_tables.md): This procedure truncates all Performance Schema summary tables, effectively resetting all aggregated performance statistics.
- [statement\_performance\_analyzer](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-procedures/statement_performance_analyzer.md): This diagnostic procedure creates a report of the statements currently running or recently run on the server, aiding in performance troubleshooting.
- [table\_exists](/docs/server/reference/system-tables/sys-schema/sys-schema-stored-procedures/table_exists.md): The table\_exists procedure checks for the existence of a specific table, view, or temporary table within a given database.
