Compatibility with MySQL
This topic describes the compatibility between seekdb and native MySQL.
seekdb supports most features and syntax from MySQL 5.7 and 8.0. However, due to architectural differences or limited demand, some features are not supported. The following sections provides compatibility details between seekdb and MySQL:
-
Data types
-
SQL syntaxes
-
Procedural Language (PL) features
-
System views
-
Character sets
-
Collations
-
Functions and expressions
-
Partition support
-
Storage engine
-
Optimizer
Data types
seekdb supports the following data types:
-
Numeric data types
-
Integer types:
BOOL/BOOLEAN/TINYINT,SMALLINT,MEDIUMINT,INT/INTEGER, andBIGINT -
Fixed-point types:
DECIMALandNUMERIC -
Floating-point types:
FLOATandDOUBLE -
Bit-value type:
BIT
-
-
Date and time types:
DATETIME,TIMESTAMP,DATE,TIME, andYEAR -
Character types:
CHAR,VARCHAR,BINARY, andVARBINARY -
Large object types:
TINYBLOB,BLOB,MEDIUMBLOB, andLONGBLOB -
Text types:
TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT, andSTRING -
Enumeration type:
ENUM -
Set type:
SET -
JSON data types
-
Spatial data types
-
Array data types
-
Vector data types
SQL syntaxes
- Supported
- Not supported
SELECT
-
Supports most query features, including single- and multi-table queries, subqueries, inner joins, semi joins, outer joins, grouping, aggregation, and regular data mining functions such as probability and linear regression.
-
Supports set operations such as
UNION,UNION ALL,MINUS,EXCEPT, andINTERSECTacross multipleSELECTqueries. -
Supports the
EXPLAINstatement for querying execution plans.
INSERT
-
Supports single- and multi-row inserts, including partition-specific inserts.
-
Supports the
INSERT INTO ... SELECT ...statement.
UPDATE
-
Supports single- and multi-column updates.
-
Supports updates by using subqueries.
-
Supports set updates.
DELETE
- Supports single- and multi-table deletion.
TRUNCATE
- Allows you to completely clear a specified table.
SELECT
- Does not support the
SELECT ... FOR SHARE ...statement.
TRUNCATE
- Does not support truncating a table that has a transaction in progress or a table that is being locked.
PL features
seekdb is compatible with most PL features of MySQL, including:
- Data types
- Stored procedures
- Custom functions
- Triggers
- Exception handling
seekdb also provides system packages such as DBMS_HYBRID_SEARCH, DBMS_STATS, DBMS_VECTOR, and DBMS_INDEX_MANAGER.
For more information about PL features, see PL reference.
System views
seekdb implements most views in the information_schema and mysql internal databases. However, due to architectural differences, some views or columns may differ in meaning or implementation compared with MySQL.
For more information about system views, see Overview of system views.
Character sets
seekdb supports the following character sets:
- binary
- utf8mb4
Collations
The following table lists the collations supported by seekdb.
| Collation | Character set | Description |
|---|---|---|
| binary | binary | Compares and sorts by byte value. |
| utf8mb4_bin | utf8mb4 | Performs case-sensitive comparison and sorting by UTF-8 encoded value. |
| utf8mb4_general_ci | utf8mb4 | Uses general, case-insensitive collation rules. |
Functions
- Supported
- Not supported
seekdb supports all analytic (window) functions that are available in MySQL, and even more. In other words, every analytic (window) function supported by MySQL is also supported by seekdb.
Compared with MySQL, seekdb does not support the following functions:
-
String functions:
LOAD_FILE()andMATCH() -
XML functions:
ExtractValue()andUpdateXML() -
Other functions:
MASTER_POS_WAIT()
Partition support
seekdb and MySQL differ in their support for table partitioning as follows:
-
seekdb supports partitioning, template-based subpartitioning, and non-template-based subpartitioning. MySQL does not support non-template-based subpartitioning.
-
For subpartitioning, seekdb supports HASH, KEY, RANGE, RANGE COLUMNS, LIST, and LIST COLUMNS subpartitioning. MySQL supports only HASH and KEY subpartitioning.
-
seekdb supports adding and dropping subpartitions in partitioned tables. MySQL does not support adding and dropping subpartitions.
tipAdding and dropping subpartitions is not supported for scenarios where the subpartitioning type is HASH or KEY.
For more information about partitions, see Partition overview.
Storage engine
Unlike MySQL, which uses data block-based storage engines such as InnoDB and MyISAM, seekdb uses a storage engine based on the LSM-Tree architecture.
Optimizer
seekdb is compatible with some optimizer features of MySQL. For more information about the optimizer, see SQL tuning.
- Supported
- Not supported
-
Commands to query execution plans:
- The output columns of the execution plan view include only
ID,OPERATOR,NAME,EST. ROWS, andCOST, as well as the details of operators.
- The output columns of the execution plan view include only
-
Statistics queries:
-
You can manually query the histogram statistics information stored in the data dictionary table by executing the
ANALYZE TABLEstatement. -
You can automatically query table statistics and column statistics through views.
-
-
Query rewriting and optimization:
-
Outer join optimization
-
Outer join simplification
-
Block Nested-Loop (BNL) and Batched Key Access (BKA) joins
-
Conditional filtering
-
Constant folding optimization
-
IS NULLoptimization (indexes do not storeNULLvalues) -
ORDER BYoptimization -
GROUP BYoptimization -
Elimination by using
DISTINCT -
LIMITpushdown -
Window function optimization
-
Avoiding full table scan
-
Predicate pushdown
-
-
Optimizer hint mechanism:
-
Join-order optimizer hints
-
Table-level optimizer hints
-
Index-level optimizer hints
-
INDEX,FULL,ORDERED, andLEADINGhints
-
-
Parallel execution capabilities such as parallel query, parallel replication, and parallel write, which are compatible with those in MySQL. seekdb also supports parallel operations such as parallel aggregation, parallel join, parallel grouping, and parallel sorting.
-
Plan caching and precompilation, which are not supported by MySQL.
-
Commands to query execution plans:
- Does not support the
SHOW WARNINGSstatement for displaying additional information about execution plans.
- Does not support the