Collections:
PS_THREAD_ID() - PS Thread ID of Given Connect
How to obtain the performance schema thread id of a given connection using the PS_THREAD_ID() function?
✍: FYIcenter.com
PS_THREAD_ID(con) is a MySQL built-in function that returns the performance schema thread id of a given connection. For example:
SELECT CONNECTION_ID(); -- +-----------------+ -- | CONNECTION_ID() | -- +-----------------+ -- | 307 | -- +-----------------+ SELECT PS_THREAD_ID(307); -- +-------------------+ -- | PS_THREAD_ID(307) | -- +-------------------+ -- | 348 | -- +-------------------+ SELECT PS_CURRENT_THREAD_ID(); -- +------------------------+ -- | PS_CURRENT_THREAD_ID() | -- +------------------------+ -- | 348 | -- +------------------------+
Reference information of the PS_THREAD_ID() function:
PS_THREAD_ID(con): id Returns the performance schema thread id of a given connection. Arguments, return value and availability: con: Required. The connection id. id: Return value. The performance schema thread id of the given connection. Available since MySQL 8.0.
Related MySQL functions:
⇒ ROLES_GRAPHML() - User Role Graph in GraphML Format
⇐ PS_CURRENT_THREAD_ID() - PS Thread ID of Current Connect
2023-12-19, 203🔥, 0💬
Popular Posts:
Can Date and Time Values Be Converted into Integers in SQL Server Transact-SQL? Can date and time va...
How To Break Query Output into Pages in MySQL? If you have a query that returns hundreds of rows, an...
How To Convert Numeric Values to Character Strings in MySQL? You can convert numeric values to chara...
How to set database to be READ_ONLY in SQL Server? Databases in SQL Server have two update options: ...
How To Generate Random Numbers with the RAND() Function in SQL Server Transact-SQL? Random numbers a...