This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create database db1; | |
use db1; | |
create table t(a int not null, shard(a), sort key()); | |
insert t values(1); | |
delimiter // | |
/* Fill table t with n or more rows, doubling the size until | |
the goal is reached. */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Create database | |
create database if not exists acme; | |
use acme; | |
-- Create table | |
create rowstore table `record` ( | |
`name` varchar(100) DEFAULT NULL, | |
`type` varchar(100) DEFAULT NULL, | |
`amount` int(11) DEFAULT NULL, | |
SHARD KEY () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create database maps; | |
use maps; | |
create table countries ( | |
boundary geography, | |
name_short varchar(3), | |
name varchar(50), | |
name_long varchar(50), | |
abbrev varchar(10), | |
postal varchar(4), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE DATABASE IF NOT EXISTS acme; | |
USE acme; | |
CREATE TABLE IF NOT EXISTS messages ( | |
id BIGINT AUTO_INCREMENT PRIMARY KEY, | |
content varchar(300) NOT NULL, | |
createdate TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE DATABASE IF NOT EXISTS acme; | |
USE acme; | |
CREATE TABLE IF NOT EXISTS messages ( | |
id BIGINT AUTO_INCREMENT PRIMARY KEY, | |
content varchar(300) NOT NULL, | |
createdate TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE DATABASE IF NOT EXISTS acme; | |
USE acme; | |
CREATE TABLE IF NOT EXISTS messages ( | |
id BIGINT AUTO_INCREMENT PRIMARY KEY, | |
content varchar(300) NOT NULL, | |
createdate TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE DATABASE IF NOT EXISTS acme; | |
USE acme; | |
CREATE TABLE IF NOT EXISTS messages ( | |
id BIGINT AUTO_INCREMENT PRIMARY KEY, | |
content varchar(300) NOT NULL, | |
createdate TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP | |
); |
NewerOlder