Distributed DBMS TiDB 3.0 Release

Available distributed DBMS release TiDB3.0developed under the influence of Google technologies Spanner и F1. TiDB belongs to the category of hybrid HTAP (Hybrid Transactional/Analytical Processing) systems capable of both providing real-time transactions (OLTP) and processing analytical queries. The project is written in Go and spreads licensed under Apache 2.0.

TiDB Features:

  • Support for SQL and the provision of a client interface that is compatible with the MySQL protocol, which makes it easy to adapt existing applications written for MySQL to TiDB, and also allows you to use common client libraries. In addition to the MySQL protocol, you can use the JSON-based API and the connector for Spark to access the DBMS.
  • Of the features of SQL, indexes, aggregate functions, GROUP BY, ORDER BY, DISTINCT expressions, merges (LEFT JOIN / RIGHT JOIN / CROSS JOIN), views, window functions and subqueries are supported. The provided opportunities are enough to organize work with TiDB of such web applications as PhpMyAdmin, Gogs and WordPress;
  • Scale-out and resiliency: Storage and processing power can be scaled up simply by adding new nodes. Data is distributed across nodes with redundancy to allow operations to continue if individual nodes fail. Failures are handled automatically.
  • The system guarantees consistency and looks like one big DBMS to the client software, despite the fact that data from many nodes is actually used to complete the transaction.
  • Different backends can be used for physical data storage on nodes, for example, local storage engines GoLevelDB and BoltDB or a proprietary distributed storage engine TiKV.
  • The ability to asynchronously change the storage scheme, allowing you to add columns and indexes on the fly without stopping the processing of ongoing operations.

All innovations:

  • Work has been done to increase productivity. In the Sysbench test, the 3.0 release outperforms the 2.1 branch by 1.5 times in select and update operations, and in the TPC-C test by 4.5 times. Optimizations have affected various types of queries, including "IN", "DO" and "NOT EXISTS" subqueries, table merge operations (JOIN), use of indexes, and more;
    Distributed DBMS TiDB 3.0 ReleaseDistributed DBMS TiDB 3.0 Release

  • A new storage engine, TiFlash, has been added to achieve better analytical (OLAP) performance through column-bound storage. TiFlash complements the previously offered TiKV storage, which stores data in the context of rows in key/value format and is more suitable for transaction processing (OLTP) tasks. TiFlash works side by side with TiKV and data continues to be replicated to TiKV as before using the Raft protocol to determine consensus, but for each group of Raft replicas an additional replica is created and used in TiFlash. Such an approach allows for a better division of resources between OLTP and OLAP tasks, and also makes transaction data instantly available for analytical queries;

    Distributed DBMS TiDB 3.0 Release

  • A distributed garbage collector has been implemented, which can significantly increase the speed of garbage collection in large clusters and improve stability;
  • An experimental implementation of the role-based access control (RBAC) system has been added. It is also possible to set access rights for the ANALYZE, USE, SET GLOBAL and SHOW PROCESSLIST operations;
  • Added the ability to use SQL expressions to extract from the slow query log;
  • Implemented a mechanism for fast recovery of deleted tables, allowing you to recover accidentally deleted data;
  • Unified format of recorded logs;
  • Added support for pessimistic locking mode, which makes transaction processing closer to MySQL;
  • Added support for window functions (window functions or analytic functions) compatible with MySQL 8.0. Window functions allow for each row of a query to perform calculations using other rows. Unlike aggregate functions, which collapse a grouped set of rows into a single row, window functions aggregate based on the contents of a "window" that includes one or more rows from the result set. Among the implemented window functions:
    NTILE, LEAD, LAG, PERCENT_RANK, NTH_VALUE, CUME_DIST, FIRST_VALUE , LAST_VALUE, RANK, DENSE_RANK, and ROW_NUMBER;

  • Added experimental support for views (VIEW);
  • Improved partitioning system (partitioning), added the ability to distribute data into sections based on a range of values ​​or hashes;
  • Added a framework for plugin development, for example, plugins have already been prepared to use the IP whitelist or audit logging;
  • Provided experimental support for the "EXPLAIN ANALYZE" function for building a SQL query execution plan (SQL Plan Management);
  • Added next_row_id command to get next row id;
  • Added new built-in functions JSON_QUOTE, JSON_ARRAY_APPEND, JSON_MERGE_PRESERVE, BENCHMARK ,COALESCE and NAME_CONST.

Source: opennet.ru

Add a comment