Search Results
https://dev.mysql.com/doc/refman/8.4/en/comparisons-using-subqueries.html
It finds all rows in table t1 containing a value that occurs twice in a given column: SELECT * FROM t1 AS t WHERE 2 = (SELECT COUNT(*) FROM t1 WHERE t1.id = t.id); For a comparison of the subquery to a scalar, the subquery must return a scalar. For ... The most common use of a subquery is in the form: non_subquery_operand comparison_operator (subquery) Where comparison_operator is one of these operators: = > < >= <= <> != <=> For example: ...
https://dev.mysql.com/doc/refman/8.4/en/create-procedure.html
By default, a stored routine is associated with the default database. To associate the routine explicitly with a given database, specify the name as db_name.sp_name when you create it. The CREATE FUNCTION statement is also used in MySQL to support ...
https://dev.mysql.com/doc/refman/8.4/en/innodb-deadlocks-handling.html
You can get deadlocks even in the case of transactions that just insert or delete a single row. That is because these operations are not really “atomic”; they automatically set locks on the (possibly several) index records of the row inserted or ... This section builds on the conceptual information about deadlocks in Section 17.7.5.2, “Deadlock ...
https://dev.mysql.com/doc/refman/8.4/en/monitor-alter-table-performance-schema.html
Enable the stage/innodb/alter% instruments: mysql> UPDATE performance_schema.setup_instruments SET ENABLED = 'YES' WHERE NAME LIKE 'stage/innodb/alter%'; Query OK, 7 rows affected (0.00 sec) Rows matched: 7 Changed: 7 Warnings: 0 Enable the stage ...
https://dev.mysql.com/doc/refman/8.4/en/mysql-cluster-online-add-node-example.html
ALGORITHM=INPLACE, REORGANIZE PARTITION does not work on tables that were created with the MAX_ROWS option. Keep in mind that using MAX_ROWS to set the number of partitions per table is deprecated, and you should use PARTITION_BALANCE instead; see ... In this section we provide a detailed example illustrating how to add new NDB Cluster data nodes online, starting with an NDB Cluster having 2 data nodes in a single node group and concluding with a cluster having 4 data nodes in 2 node ...
https://dev.mysql.com/doc/refman/8.4/en/mysql-cluster-programs-ndb-config.html
This tool extracts current configuration information for data nodes, SQL nodes, and API nodes from one of a number of sources: an NDB Cluster management node, or its config.ini or my.cnf file. --rows=separator, -r separator Command-Line Format ...
https://dev.mysql.com/doc/refman/8.4/en/nested-loop-joins.html
Nested-Loop Join Algorithm Nested-Loop Join Algorithm A simple nested-loop join (NLJ) algorithm reads rows from the first table in a loop one at a time, passing each row to a nested loop that processes the next table in the join. MySQL executes ...
https://dev.mysql.com/doc/refman/8.4/en/performance-schema-table-wait-summary-tables.html
It resets the summary columns to zero rather than removing rows. It resets the summary columns to zero rather than removing rows. In event rows, these locks are distinguished by the OPERATION column, which has one of these values: read external ...
https://dev.mysql.com/doc/refman/8.4/en/replication-privilege-checks.html
You can increase the security of a replication channel where privilege checks are applied by adding one or both of these options to the CHANGE REPLICATION SOURCE TO statement when you specify the PRIVILEGE_CHECKS_USER account for the channel: The ...
https://dev.mysql.com/doc/refman/8.4/en/show-create-table.html
row *************************** Table: t Create Table: CREATE TABLE `t` ( `id` int NOT NULL AUTO_INCREMENT, `s` char(60) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci SHOW CREATE TABLE displays ... SHOW CREATE TABLE tbl_name Shows the CREATE TABLE statement that creates the named ...