Skip to main content
Version: V1.4.0

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, and BIGINT

    • Fixed-point types: DECIMAL and NUMERIC

    • Floating-point types: FLOAT and DOUBLE

    • Bit-value type: BIT

  • Date and time types: DATETIME, TIMESTAMP, DATE, TIME, and YEAR

  • Character types: CHAR, VARCHAR, BINARY, and VARBINARY

  • Large object types: TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB

  • Text types: TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT, and STRING

  • Enumeration type: ENUM

  • Set type: SET

  • JSON data types

  • Spatial data types

  • Array data types

  • Vector data types

SQL syntaxes​

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, and INTERSECT across multiple SELECT queries.

  • Supports the EXPLAIN statement 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.

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.

CollationCharacter setDescription
binarybinaryCompares and sorts by byte value.
utf8mb4_binutf8mb4Performs case-sensitive comparison and sorting by UTF-8 encoded value.
utf8mb4_general_ciutf8mb4Uses general, case-insensitive collation rules.

Functions​

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.

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.

    tip

    Adding 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.

  • Commands to query execution plans:

    • The output columns of the execution plan view include only ID, OPERATOR, NAME, EST. ROWS, and COST, as well as the details of operators.
  • Statistics queries:

    • You can manually query the histogram statistics information stored in the data dictionary table by executing the ANALYZE TABLE statement.

    • 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 NULL optimization (indexes do not store NULL values)

    • ORDER BY optimization

    • GROUP BY optimization

    • Elimination by using DISTINCT

    • LIMIT pushdown

    • 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, and LEADING hints

  • 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.