Go to file
lujiashun 9633ff019c feat(tianmu): improve SQL load performance after SQL load feature enhancement. (#1113)
[summary]
1 One optimization direction is to reduce the frequency of the memory allocate, only allocate one or two times for one column;
2 use integer than string to fix the field;
3 use "restore_record" to reset the default value instead of to reset the field default one by one;
4 use vector to mark the buffer pointer and length instead of map structure;
2022-12-16 07:27:25 +00:00
.github test(mtr): update pull_requests.yml and make the innodb testcase run(#1057) 2022-12-15 07:18:26 +00:00
BUILD feat(stonedb): upgrade stonedb to adapt mysql 5.7 #(141) 2022-07-06 16:25:29 +00:00
Docs docs(compiling): update some docs(#1089) 2022-12-09 12:54:08 +00:00
client feat(tianmu): stonedb namespace to tianmu (#337) 2022-08-03 11:19:48 +08:00
cmake fix(tianmu): fix stonedb has two LZ4 versions (#471) (#473) 2022-09-08 08:05:07 +00:00
dbug feat(stonedb): upgrade stonedb to adapt mysql 5.7 #(141) 2022-07-06 16:25:29 +00:00
extra fix(tianmu): fix stonedb has two LZ4 versions (#471) (#473) 2022-09-08 08:05:07 +00:00
include fix(unittest): add mysqld_error.h used to avoid tianmu/unittest make failed. #429 2022-12-06 02:47:30 +00:00
libbinlogevents feat(stonedb): upgrade stonedb to adapt mysql 5.7 #(141) 2022-07-06 16:25:29 +00:00
libbinlogstandalone feat(stonedb): upgrade stonedb to adapt mysql 5.7 #(141) 2022-07-06 16:25:29 +00:00
libmysql fix(stonedb): add some missing files ignored in .gitignore (#166) (#167) 2022-07-08 08:14:31 +08:00
libmysqld feat(tianmu): stonedb namespace to tianmu (#337) 2022-08-03 11:19:48 +08:00
libservices feat(stonedb): upgrade stonedb to adapt mysql 5.7 #(141) 2022-07-06 16:25:29 +00:00
man feat(stonedb): upgrade stonedb to adapt mysql 5.7 #(141) 2022-07-06 16:25:29 +00:00
mysql-test test(mtr): add and update some testcases(#497) 2022-12-16 01:45:51 +00:00
mysys feat(stonedb): upgrade stonedb to adapt mysql 5.7 #(141) 2022-07-06 16:25:29 +00:00
mysys_ssl feat(stonedb): upgrade stonedb to adapt mysql 5.7 #(141) 2022-07-06 16:25:29 +00:00
packaging feat(stonedb): upgrade stonedb to adapt mysql 5.7 #(141) 2022-07-06 16:25:29 +00:00
plugin fix(stonedb): add some missing files ignored in .gitignore (#166) (#167) 2022-07-08 08:14:31 +08:00
rapid feat(stonedb): upgrade stonedb to adapt mysql 5.7 #(141) 2022-07-06 16:25:29 +00:00
regex feat(stonedb): upgrade stonedb to adapt mysql 5.7 #(141) 2022-07-06 16:25:29 +00:00
scripts The compilation script lacks the path parameters of marisa and rocksdb 2022-12-09 10:42:27 +00:00
sql fix(tianmu):Master-slave replication, sql_mode MANDATORY_TIANMU has problems in some scenarios (#1090) 2022-12-13 09:17:34 +00:00
sql-common feat(tianmu): stonedb namespace to tianmu (#337) 2022-08-03 11:19:48 +08:00
storage feat(tianmu): improve SQL load performance after SQL load feature enhancement. (#1113) 2022-12-16 07:27:25 +00:00
strings feat(stonedb): upgrade stonedb to adapt mysql 5.7 #(141) 2022-07-06 16:25:29 +00:00
support-files feat(tianmu): stonedb namespace to tianmu (#337) 2022-08-03 11:19:48 +08:00
testclients feat(tianmu): stonedb namespace to tianmu (#337) 2022-08-03 11:19:48 +08:00
unittest feat(stonedb): upgrade stonedb to adapt mysql 5.7 #(141) 2022-07-06 16:25:29 +00:00
vio feat(stonedb): upgrade stonedb to adapt mysql 5.7 #(141) 2022-07-06 16:25:29 +00:00
website After compilation, program startup allows root user to log in remotely. 2022-12-07 07:23:32 +00:00
win feat(stonedb): upgrade stonedb to adapt mysql 5.7 #(141) 2022-07-06 16:25:29 +00:00
zlib feat(stonedb): upgrade stonedb to adapt mysql 5.7 #(141) 2022-07-06 16:25:29 +00:00
.gitignore docs(tianmu): update the docs of stonedb-5.7 (#489) (#492) 2022-09-14 13:25:38 +00:00
CMakeLists.txt fix(unittest): add mysqld_error.h used to avoid tianmu/unittest make failed. #429 2022-12-06 02:47:30 +00:00
CODE_OF_CONDUCT.md docs(stonedb): update Community Standards (#204) 2022-07-12 14:22:12 +00:00
CONTRIBUTING.md feat(scripts): remove hard code for abs path "/stonedb57/install" (#380) 2022-08-29 14:04:01 +00:00
Doxyfile-perfschema feat(stonedb): upgrade stonedb to adapt mysql 5.7 #(141) 2022-07-06 16:25:29 +00:00
INSTALL feat(stonedb): upgrade stonedb to adapt mysql 5.7 #(141) 2022-07-06 16:25:29 +00:00
LICENSE fix(LICENSE):fix LICENSE (#446) 2022-08-30 02:37:15 +00:00
README feat(stonedb): upgrade stonedb to adapt mysql 5.7 #(141) 2022-07-06 16:25:29 +00:00
README.md docs(readme): fix the link of build(#1139) 2022-12-16 07:00:22 +00:00
README_zh-hans.md docs(readme): fix the link of build(#1139) 2022-12-16 07:00:22 +00:00
VERSION feat(stonedb): upgrade stonedb to adapt mysql 5.7 #(141) 2022-07-06 16:25:29 +00:00
config.h.cmake feat(stonedb): upgrade stonedb to adapt mysql 5.7 #(141) 2022-07-06 16:25:29 +00:00
configure.cmake feat(stonedb): upgrade stonedb to adapt mysql 5.7 #(141) 2022-07-06 16:25:29 +00:00

README.md

logo

An One-Stop Real-Time HTAP database

English | 中文


GitHub Workflow Status codecov Docker Pulls GitHub license slack badge WeChat badge Twitter Follow

What is StoneDB

logo

StoneDB is a MySQL-compatible high-performance hybrid transaction/analytical processing (HTAP) database. It provides analytical processing (AP) abilities to MySQL. The running systems can be seamlessly migrated to StoneDB without any code changed. Compared to InnoDB, StoneDB provides 10 times the query performance as well as 10 times the load performance. StoneDB also provides 10:1 to 40:1 compression ratio.

Overview

logo

Architecture 2.0

logo

For more information about StoneDB, see stonedb.io.

Contribution

StoneDB welcomes all kinds of contributions, such as contributing code to the code base, sharing your experience on how to use StoneDB, and providing insights in the community on the Forums, or contributing to projects that make StoneDB a better project. For more specifics, see the contributing guide for more specifics.

Getting Started

The Getting Started part provides information about StoneDB supported platforms, installation (including creating your first table), and migrating from the running MySQL databases to StoneDB.

Supported Platform

The officially supported subsets of platforms are:

  • CentOS 7.x or higher
  • Ubuntu 20.04 or higher
  • Red Hat Enterprise Linux 7 (RHEL 7.x)

Compiler toolsets we verify our builds with:

  • GCC 7.3 or higher

The following packages we verify our builds with:

  • Make 3.82 or later
  • CMake 3.7.2 or later
  • marisa 0.77
  • RocksDB 6.12.6
  • Boost 1.66

Build StoneDB from the Source Code

On Ubuntu 20.04

For more information, see Compile StoneDB on Ubuntu 20.04.

On CentOS 7.X

For more information, see Compile StoneDB on CentOS 7.x.

On RedHat 7.X

For more information, see Compile StoneDB on RedHat 7.x.

Build StoneDB from Source Code in a Docker Container

For more information, see Compile StoneDB in a Docker Container.

Configure StoneDB

After StoneDB is installed, you need to configure at least the following parameters in the my.cnf file:

#the stonedb configuration options are listed as following.
#for an example.
[mysqld] 
# For version 5.7 or later, the engine should be set to tianmu
default-storage-engine=tianmu
# For version 5.6, the engine should be set to stonedb
# default-storage-engine=stonedb
default-tmp-storage-engine=MyISAM
binlog-format=STATEMENT

Initialize the Database

# For version 5.6
cd /path/to/your/path/bin && ./mysql_install_db --basedir=/stonedb/install/ --datadir=/stonedb/install/data/ --user=mysql

# For version 5.7 or later
cd /path/to/your/path/bin && ./mysqld --initialize --basedir=/stonedb/install/ --datadir=/stonedb/install/data/ --user=mysql

Start the Database Instance

mysqld_safe --defaults-file=/path/to/my.cnf --user=mysql &

Create a StoneDB Table

--The example code for creating a table with 'tianmu' engine.(For version 5.7 or later)
CREATE TABLE `example_table` (
  `id1` bigint(20) NOT NULL DEFAULT '0',
  `id1_type` int(10) NOT NULL DEFAULT '0',
  `id2` bigint(20) NOT NULL DEFAULT '0',
  `id2_type` int(10) NOT NULL DEFAULT '0',
  `data` varchar(255) NOT NULL DEFAULT '',
  `time` bigint(20) NOT NULL DEFAULT '0',
  `version` int(11) NOT NULL DEFAULT '0',
) ENGINE=tianmu;
-- For version 5.6, the engine should be set to 'stonedb'

The example shows some important features and limitations in StoneDB. For more information about limitations, please see StoneDB Limitations.

  • StoneDB data is stored in Column format and persist to RocksDB. All data is compressed, and the compression ratio can be 10:1 to 40:1.
  • StoneDB can achieve a competitive performance when processing ad-hoc queries, even without any indexes created. For more details, click here.

Now, let's exprience your StoneDB


Switch from MySQL to StoneDB in Production

If you want to use both InnoDB and StoneDB within the same instance to run a join query, set stonedb_ini_allowmysqlquerypath to 1 in file my.cnf.

Online migration tools to move data between storage engines are not currently developed, but you obviously want this to happen without downtime, data loss, or inaccurate results. To achieve this, you need to move data logically from the source MySQL server that uses the InnoDB engine and load it into StoneDB to do analytical processing. The detailed procedure is as follows:

  1. Create a StoneDB instance and tables.
  2. Copy all the database and table schemas from the source to the destination.
  3. Dump each table to a file by executing SELECT … INTO OUTFILE.
  4. Send the files to the destination and load them using LOAD DATA … INFILE.

Documentation

Documentation can be found online at https://stonedb.io. The documentation provides you with StoneDB basics, extensive examples of using StoneDB, as well as other information that you may need during your usage of StoneDB.

Discussion

The GitHub Discussions is the home for most discussions and communications about the StoneDB project. We welcome your participation. Every single opinion or suggestion of yours is welcomed and valued. We anticipate StoneDB to be an open and influential project.

Join StoneDB Wechat Group

You can add our little assistant's WeChat and join StoneDB's user group:

Code of Conduct

When participating in the StoneDB project, please ensure all your behavior complies with the Code of Conduct.