Repository navigation
Tsurugi 1.13.0 - Release Notes (en) #249
akirakw
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
1.13.0 Release Notes
Overview
Tsurugi 1.13.0 improves the storage efficiency of the index structure and reduces memory usage, especially for tables that use secondary indexes.
Tsurugi stores table and index data in memory in a layered structure that splits each key into 8-byte slices from the beginning.
In previous versions, even after a key could be distinguished from other keys, the rest of the key was still stored one layer per 8 bytes, so longer keys used more memory.
This was noticeable in secondary indexes, whose keys consist of a column value followed by the primary key, and in long string primary keys such as UUIDs.
This version improves this by storing that remaining part together.
For example, in a benchmark (Phone-Bill) that uses a table with two secondary indexes, memory usage (RSS) was reduced by more than half, from about 130 GB to about 62 GB.
Tsurugi 1.13.0 also allows arbitrary expressions to be specified in the
GROUP BYclause.In previous versions, only columns could be specified in the
GROUP BYclause, and to group by the result of an expression, you had to retrieve the result of the expression as a column in a subquery.In this version, you can write an expression directly in the
GROUP BYclause, as inGROUP BY EXTRACT(YEAR FROM ts).Combined with the
EXTRACTfunction supported in Tsurugi 1.12.0, aggregations of time-series data, such as per year or per month, can be written in simpler SQL.This version also includes several important bug fixes and stability improvements.
We strongly recommend all users of previous versions to upgrade to this release.
New Features and Improvements
New Features and Improvements - SQL
GROUP BYclauseGROUP BYclause.GROUP BYclause can be referred to from theSELECTclause, theHAVINGclause, and theORDER BYclause. It can also be referred to as a part of an expression.SELECTclause and others must be written in the same form as the expression specified in theGROUP BYclause. For example, forGROUP BY a + 1,SELECT 1 + ais not regarded as the same expression and results in an error (column must be aggregated).Note
In this version, the following restrictions apply to expressions in the
GROUP BYclause.GROUP BYclause:GROUP BY 1)GROUP BY a + COUNT(*))BLOBorCLOBtypeGROUP BYclause, but cannot be referred to from theSELECTclause and others:BETWEENorINpredicatesCASEexpressions (e.g.,CASE a WHEN 1 THEN ... END)NULLIFexpressionsTo refer to the result of grouping by these expressions, retrieve the result of the expression as a column in a subquery and specify that column in the
GROUP BYclause, as in previous versions.Important
Starting with this version, specifying
COLLATEin theGROUP BYclause results in an error (collation in GROUP BY is not yet supported).In previous versions,
COLLATEspecified in theGROUP BYclause did not cause an error and was ignored.Note
For other detailed specifications and current restrictions on SQL features, see the following document in tsurugidb:
New Features and Improvements - Transaction
Table rows and index entries are stored in memory in a layered structure that splits each key into 8-byte slices from the beginning. In previous versions, even after a key could be distinguished from other keys partway through, the remaining part was still stored one layer per 8 bytes, so longer keys used more memory. This version improves this by storing the remaining part together.
For each table and index, the reduction is larger when keys can be distinguished from other keys closer to the beginning and the remaining part is longer.
BIGINT, there is little room for reduction.In the Phone-Bill benchmark, the memory usage (RSS) of the database was reduced by more than half, from about 130 GB to about 62 GB. The call history table in this benchmark has a primary key of about 32 bytes on average, consisting of phone numbers, the call start time, and so on, and has secondary indexes such as one on the call start time. The call start time is almost unique and is followed by the long primary key, so the improvement in this version is very effective.
The following shows other examples of the effect with a single index configuration. A secondary index was created one at a time on columns with different value characteristics in a table of 3 million rows whose primary key is
BIGINT, and the memory usage per entry was measured.CHAR(36))VARCHAR(64))TIMESTAMP)CHAR(10))BIGINT)DECIMAL(12,2))TIMESTAMP)BIGINT)INT)New Features and Improvements - Client
Cursor.explainmethod, which retrieves the execution plan of SQLexplainmethod are the same as those of theexecutemethod. For details, see the following document:Connection.commitorConnection.rollbackis calledcommitorrollbackis called.--query-pool-size, which specifies the maximum number of resources held by thequerytoolquerytool holds resources such as the session and transaction for reading the rest. If the rest was never read, these resources remained without being released.--query-pool-sizeis specified and the number of held resources exceeds the limit, resources are released starting from the oldest. The default is0(unlimited).New Features and Improvements - Distribution
apache.jfrog.iotopackages.apache.orgpackages.apache.org. The same packages are available from both hosts, and the installed version of Apache Arrow does not change.Bug Fixes
Bug Fixes - SQL
TRUNCATE TABLEon the same table could cause the database to terminate abnormallyTRUNCATE TABLEprocessing in which DML on the same table could not be excluded. If a statement without placeholders was executed orpreparewas performed during this period,TRUNCATE TABLEcould fail with an error (DDL operation was blocked by other DML operation), and subsequent DML execution could cause the database to terminate abnormally. In addition, the table data could be deleted even thoughTRUNCATE TABLEreturned an error.DECIMALvalues that are numerically equal but have different internal representations (e.g.,1.0and1) could be treated as different values inGROUP BY,SELECT DISTINCT,COUNT(DISTINCT ...), and equi-joins, producing incorrect query resultsDECIMALvalues computed by expressions are used as keys, for example when branches of aCASEexpression orCOALESCEfunction have different types, or when results of expressions with different scales are combined byUNION ALL. It does not occur when table columns are used as keys as they are.COUNT(DISTINCT ...)onREALandDOUBLEvalues treatedNaNvalues as different from each other and returned an incorrect valueNaNvalues are treated as equal to each other, in the same way as inGROUP BYandSELECT DISTINCT.CHAR_LENGTHon a string column that stores an invalid UTF-8 string loaded from a Parquet file could reference memory outside the string and return incorrect resultsCHAR_LENGTHreturnsNULL.Bug Fixes - Transaction
DROP TABLEorTRUNCATE TABLEon a table specified inWRITE PRESERVEof an LTX while the LTX was running, the database could terminate abnormally when the LTX was committed or rolled backBug Fixes - Endpoint
BLOBorCLOBdata was sent in relay mode, the files of the sent data remained under thevar/blob/sessionsdirectory on the database sidePreparedStatementor throughLargeObjectClientin Tsubakuro/Java. It does not occur with the UDF BLOB client API.Bug Fixes - UDF
APPLYoperator failed with an error partway throughudf-plugin-builder0.5.1 or later.APPLYoperator and the result rows containedVARCHARorVARBINARYvalues of 16 bytes or more, those values could be overwritten by values of other columns in the same rowBLOBorCLOBcolumn. No error occurs; only the values change.endpointandsecureparameters in the UDF plugin configuration file (<plugin-name>.ini) with spaces around the pipe character|, the second and subsequent values were not applied correctlyBug Fixes - Client
Connection.commitfailed with an error, the failed transaction continued to be used and subsequent SQL also failed withInactiveTransactionExceptionquerytool, the session and transaction remained without being releasedUpgrade Notes
Client Compatibility List
Tsurugi 1.13.0 supports the following clients.
Please upgrade each client as needed when upgrading Tsurugi.
Transaction Log Format Changes
In this version, the transaction log format version has been changed to Version 8. When you start version 1.13.0 using a transaction log that was used with version 1.12.0, the transaction log format version will be automatically updated.
As a result, transaction logs started with version 1.13.0 cannot be used with version 1.12.0. Also, please note that backups created with version 1.13.0 or later cannot be restored with version 1.12.0.
Upgrade Procedure
For instructions on upgrading from previous versions, see:
Other Information
For a full list of changes in this version, see the Changelog:
For known issues and additional information about fixes in this version, see:
This discussion was created from the release 1.13.0.
All reactions