Skip to content

Instantly share code, notes, and snippets.

@memorycraft
Created September 21, 2011 11:43
Show Gist options
  • Save memorycraft/1231855 to your computer and use it in GitHub Desktop.
Save memorycraft/1231855 to your computer and use it in GitHub Desktop.
Spiderテーブルとダミー、VPテーブルの設定
create table gift_new(
id int auto_increment,
name varchar(255),
description text,
created_at datetime not null,
primary key(id)
) engine = Spider DEFAULT CHARSET=utf8
CONNECTION ' table "gift", user "xxxxxxxxxxxxx", password "xxxxxxxxxxxxx" '
PARTITION BY LIST(MOD(id, 2)) (
PARTITION hostb VALUES IN (0) comment 'host "111.111.111.111", port "3306"',
PARTITION hostc VALUES IN (1) comment 'host "222.222.222.222", port "3306"'
);
create table gift_dummy like gift;
create table gift_vp(
id int auto_increment,
name varchar(255),
description text,
created_at datetime not null,
primary key(id)
)engine=vp
comment 'table_name_list "gift_dummy gift_new", cit "2", cil "2", ctm "1", ist "1", zru "1"';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment