https://dev.mysql.com/replace.html
REPLACE works exactly like INSERT, except that if an old row in the table has the same value as a new row for a PRIMARY KEY or a UNIQUE index, the old row is deleted before the new row is inserted. Note REPLACE makes sense only if a table has a ...
https://dev.mysql.com/replication-options-binary-log.html
For servers that are used in a replication topology, you must specify a unique nonzero server ID for each server. For the before image, it is necessary only that the minimum set of columns required to uniquely identify rows is logged. Otherwise, if ... Startup Options Used with Binary Logging System Variables Used with Binary Logging You can use the mysqld options and system variables that are described in this section to affect the operation of the binary log as well as to control which statements are written to the binary ...
https://dev.mysql.com/server-system-variables.html
It applies to evaluation of expressions that have either of these equivalent forms, where the optimizer uses a nonunique index to look up col_name values: col_name IN(val1, ..., valN) col_name = val1 OR ... For servers that are used in a replication ... The MySQL server maintains many system variables that configure its ...
https://dev.mysql.com/show-columns.html
Key Whether the column is indexed: If Key is empty, the column either is not indexed or is indexed only as a secondary column in a multiple-column, nonunique index. If Key is UNI, the column is the first column of a UNIQUE index. (A UNIQUE index ...
https://dev.mysql.com/converting-tables-to-innodb.html
If you have UNIQUE constraints on secondary keys, you can speed up a table import by turning off the uniqueness checks temporarily during the import operation: SET unique_checks=0; ... SET unique_checks=1; For big tables, this saves disk I/O because ... If you have MyISAM tables that you want to convert to InnoDB for better reliability and scalability, review the following guidelines and tips before ...
https://dev.mysql.com/create-table-select.html
You can precede the SELECT by IGNORE or REPLACE to indicate how to handle rows that duplicate unique key values. With IGNORE, rows that duplicate an existing row on a unique key value are discarded. With REPLACE, new rows replace rows that have the ... You can create one table from another by adding a SELECT statement at the end of the CREATE TABLE statement: CREATE TABLE new_tbl [AS] SELECT * FROM orig_tbl; MySQL creates new columns for all elements in the ...
https://dev.mysql.com/innodb-persistent-stats.html
The number of columns in the table's primary key is also important to consider, as primary key columns are appended to each nonunique index. Note For nonunique indexes, InnoDB appends the columns of the primary key. Only two columns are defined for ... The persistent optimizer statistics feature improves plan stability by storing statistics to disk and making them persistent across server restarts so that the optimizer is more likely to make consistent choices each time for a given ...
https://dev.mysql.com/insert-on-duplicate.html
If you specify an ON DUPLICATE KEY UPDATE clause and a row to be inserted would cause a duplicate value in a UNIQUE index or PRIMARY KEY, an UPDATE of the old row occurs. In general, you should try to avoid using an ON DUPLICATE KEY UPDATE clause ...With ON DUPLICATE KEY UPDATE, the affected-rows value per row is 1 if the row is inserted as a new row, 2 if an existing row is updated, and 0 if an existing row is set to its current ...
https://dev.mysql.com/insert.html
INSERT with an ON DUPLICATE KEY UPDATE clause enables existing rows to be updated if a row to be inserted would cause a duplicate value in a UNIQUE index or PRIMARY KEY. REPLACE is the counterpart to INSERT IGNORE in the treatment of new rows that ... INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO] tbl_name [PARTITION (partition_name [, partition_name] ...)] [(col_name [, col_name] ...)] {VALUES | VALUE} (value_list) [, (value_list)] ...
https://dev.mysql.com/mysql-cluster-limitations-syntax.html
Using nullable columns in unique keys and primary keys means that queries using these columns are handled as full table scans. A BIT column cannot be a primary key, unique key, or index, nor can it be part of a composite primary key, unique key, or ... Some SQL statements relating to certain MySQL features produce errors when used with NDB tables, as described in the following list: Temporary ...