schema_qq.xml
15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
<?xml version="1.0"?>
<!DOCTYPE mycat:schema SYSTEM "schema.dtd">
<mycat:schema xmlns:mycat="http://io.mycat/">
<!-- schema定义 -->
<schema name="yhb_promotion_split" checkSQLschema="false" sqlMaxLimit="100">
<table name="coupons_logs" dataNode="dn_promt_split$1-4" rule="rule_promt" />
<table name="coupons_logs_third_info" dataNode="dn_promt_split$1-4" rule="rule_promt" />
<table name="coupons_personal" dataNode="dn_promt_split$1-4" rule="rule_promt" />
<table name="coupons" dataNode="dn_promt_split$1-4" type="global" />
<table name="coupons_logs_custom_type" dataNode="dn_promt_split$1-4" rule="rule_promt" />
<table name="coupons_bag" dataNode="dn_promt_split$1-4" rule="rule_promt" />
</schema>
<schema name="yh_orders_split" checkSQLschema="false" sqlMaxLimit="100">
<table name="shopping_cart" dataNode="dn_order_split$1-4" rule="rule_order" />
<table name="shopping_cart_items" dataNode="dn_order_split$1-4" rule="rule_order" />
<table name="orders" dataNode="dn_order_split$1-4" rule="rule_order" />
<table name="orders_goods" dataNode="dn_order_split$1-4" rule="rule_order" ruleRequired="true" />
<table name="orders_coupons" dataNode="dn_order_split$1-4" rule="rule_order" ruleRequired="true" />
<table name="order_promotion_info" dataNode="dn_order_split$1-4" rule="rule_order" ruleRequired="true" />
<table name="order_ext_attribute" dataNode="dn_order_split$1-4" rule="rule_order" ruleRequired="true" />
<table name="orders_meta" dataNode="dn_order_split$1-4" rule="rule_order" ruleRequired="true" />
<table name="crf_pay_log" dataNode="dn_order_split$1-4" rule="rule_order" />
<table name="cmb_netpay_bind" dataNode="dn_order_split$1-4" rule="rule_order" />
<table name="order_code_sequence" dataNode="dn_order_split$1-4" rule="rule_order" />
<table name="free_shipping_times" dataNode="dn_order_split$1-4" rule="rule_order" />
<table name="orders_pay" dataNode="dn_order_split$1-4" rule="rule_order" />
<table name="wx_pay_action" dataNode="dn_order_split$1-4" rule="rule_order" />
<table name="order_message" dataNode="dn_order_split$1-4" rule="rule_order" />
<table name="order_profile" dataNode="dn_order_split$1-4" rule="rule_order" />
<table name="orders_pre_pay" dataNode="dn_order_nosplit" />
<table name="order_pay" dataNode="dn_order_nosplit" />
<table name="order_default_preferences" dataNode="dn_order_nosplit" />
<table name="order_cancel" dataNode="dn_order_nosplit" />
</schema>
<!-- cms -->
<schema name="yh_resource" dataNode="dn_yh_resource" checkSQLschema="false" sqlMaxLimit="100" />
<schema name="yh_operations" dataNode="dn_yh_operations" checkSQLschema="false" sqlMaxLimit="100" />
<schema name="yh_setting" dataNode="dn_yh_setting" checkSQLschema="false" sqlMaxLimit="100" />
<schema name="yh_helper" dataNode="dn_yh_helper" checkSQLschema="false" sqlMaxLimit="100" />
<schema name="yoho_activity" dataNode="dn_yoho_activity" checkSQLschema="false" sqlMaxLimit="100" />
<schema name="yh_events" dataNode="dn_yh_events" checkSQLschema="false" sqlMaxLimit="100" />
<schema name="yhb_operations" dataNode="dn_yhb_operations" checkSQLschema="false" sqlMaxLimit="100" />
<schema name="yh_guang" dataNode="dn_yh_guang" checkSQLschema="false" sqlMaxLimit="100" />
<schema name="yh_wechat" dataNode="dn_yh_wechat" checkSQLschema="false" sqlMaxLimit="100" />
<schema name="yh_lottery" dataNode="dn_yh_lottery" checkSQLschema="false" sqlMaxLimit="100" />
<schema name="q_msg_system" dataNode="dn_q_msg_system" checkSQLschema="false" sqlMaxLimit="100" />
<schema name="yh_consult" dataNode="dn_yh_consult" checkSQLschema="false" sqlMaxLimit="100" />
<schema name="yh_comment" dataNode="dn_yh_comment" checkSQLschema="false" sqlMaxLimit="100" />
<!-- passport -->
<schema name="yh_passport" dataNode="dn_yh_passport" checkSQLschema="false" sqlMaxLimit="100" />
<schema name="yoho_passport" dataNode="dn_yoho_passport" checkSQLschema="false" sqlMaxLimit="100" />
<!-- order -->
<schema name="yh_coupons" dataNode="dn_yh_coupons" checkSQLschema="false" sqlMaxLimit="100" />
<schema name="yh_orders" dataNode="dn_yh_orders" checkSQLschema="false" sqlMaxLimit="100" />
<schema name="yhb_promotion" dataNode="dn_yhb_promotion" checkSQLschema="false" sqlMaxLimit="100" />
<schema name="yoho_pay" dataNode="dn_yoho_pay" checkSQLschema="false" sqlMaxLimit="100" />
<!-- shops -->
<schema name="yh_shops" dataNode="dn_yh_shops" checkSQLschema="false" sqlMaxLimit="100" />
<schema name="yhb_shops" dataNode="dn_yhb_shops" checkSQLschema="false" sqlMaxLimit="100" />
<!-- yohood -->
<schema name="yohood" dataNode="dn_yohood" checkSQLschema="false" sqlMaxLimit="100" />
<!-- store -->
<schema name="yh_extendstore" dataNode="dn_yh_extendstore" checkSQLschema="false" sqlMaxLimit="100" />
<!-- unions -->
<schema name="yh_unions" dataNode="dn_yh_unions" checkSQLschema="false" sqlMaxLimit="100" />
<!-- uic -->
<schema name="yh_community" dataNode="dn_yh_community" checkSQLschema="false" sqlMaxLimit="100" />
<schema name="yh_inbox" dataNode="dn_yh_inbox" checkSQLschema="false" sqlMaxLimit="100" />
<schema name="yoho_sms" dataNode="dn_yoho_sms" checkSQLschema="false" sqlMaxLimit="100" />
<!-- yohobuylogs -->
<schema name="yohobuy_logs" dataNode="dn_yohobuy_logs" checkSQLschema="false" sqlMaxLimit="100" />
<dataNode name="dn_promt_split1" dataHost="dh_promt_split1" database="yhb_promotion" />
<dataNode name="dn_promt_split2" dataHost="dh_promt_split2" database="yhb_promotion" />
<dataNode name="dn_promt_split3" dataHost="dh_promt_split3" database="yhb_promotion" />
<dataNode name="dn_promt_split4" dataHost="dh_promt_split4" database="yhb_promotion" />
<dataNode name="dn_order_split1" dataHost="dh_orders_split1" database="yh_orders" />
<dataNode name="dn_order_split2" dataHost="dh_orders_split2" database="yh_orders" />
<dataNode name="dn_order_split3" dataHost="dh_orders_split3" database="yh_orders" />
<dataNode name="dn_order_split4" dataHost="dh_orders_split4" database="yh_orders" />
<dataNode name="dn_order_nosplit" dataHost="dh_order_nosplit" database="yh_orders" />
<dataNode name="dn_yh_coupons" dataHost="dh_order_nosplit" database="yh_coupons" />
<dataNode name="dn_yh_orders" dataHost="dh_order_nosplit" database="yh_orders" />
<dataNode name="dn_yhb_promotion" dataHost="dh_order_nosplit" database="yhb_promotion" />
<dataNode name="dn_yoho_pay" dataHost="dh_order_nosplit" database="yoho_pay" />
<dataNode name="dn_yh_resource" dataHost="dh_cms" database="yh_resource" />
<dataNode name="dn_yh_operations" dataHost="dh_cms" database="yh_operations" />
<dataNode name="dn_yh_setting" dataHost="dh_cms" database="yh_setting" />
<dataNode name="dn_yh_helper" dataHost="dh_cms" database="yh_helper" />
<dataNode name="dn_yoho_activity" dataHost="dh_cms" database="yoho_activity" />
<dataNode name="dn_yh_events" dataHost="dh_cms" database="yh_events" />
<dataNode name="dn_yhb_operations" dataHost="dh_cms" database="yhb_operations" />
<dataNode name="dn_yh_guang" dataHost="dh_cms" database="yh_guang" />
<dataNode name="dn_yh_wechat" dataHost="dh_cms" database="yh_wechat" />
<dataNode name="dn_yh_lottery" dataHost="dh_cms" database="yh_lottery" />
<dataNode name="dn_q_msg_system" dataHost="dh_cms" database="q_msg_system" />
<dataNode name="dn_yh_consult" dataHost="dh_cms" database="yh_consult" />
<dataNode name="dn_yh_comment" dataHost="dh_cms" database="yh_comment" />
<dataNode name="dn_yh_passport" dataHost="dh_passport" database="yh_passport" />
<dataNode name="dn_yoho_passport" dataHost="dh_passport" database="yoho_passport" />
<dataNode name="dn_yh_shops" dataHost="dh_shops" database="yh_shops" />
<dataNode name="dn_yhb_shops" dataHost="dh_shops" database="yhb_shops" />
<dataNode name="dn_yohood" dataHost="dh_yohood" database="yohood" />
<dataNode name="dn_yh_extendstore" dataHost="dh_yh_extendstore" database="yh_extendstore" />
<dataNode name="dn_yh_unions" dataHost="dh_yh_unions" database="yh_unions" />
<dataNode name="dn_yh_community" dataHost="dh_uic" database="yh_community" />
<dataNode name="dn_yh_inbox" dataHost="dh_message" database="yh_inbox" />
<dataNode name="dn_yoho_sms" dataHost="dh_message" database="yoho_sms" />
<dataNode name="dn_yohobuy_logs" dataHost="dh_yohobuy_logs" database="yohobuy_logs" />
<!-- balance=0 不开启读写分离 balance=1读操作在主备和读库上执行 balance=2 读操作在写库和读库随机分布 blance=3 读操作只在读库上分布 -->
<!-- promotion 分库分表-->
<dataHost name="dh_promt_split1" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="promotW1" url="write1.promotion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="promotR1" url="read1.promotion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_promt_split2" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="promotW2" url="write2.promotion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="promotR2" url="read2.promotion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_promt_split3" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="promotW3" url="write3.promotion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="promotR3" url="read3.promotion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_promt_split4" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="promotW4" url="write4.promotion.yohoops.org:3307" password="yh_test" user="yh_vpc_bak">
<readHost host="promotR4" url="read4.promotion.yohoops.org:3307" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<!-- orders分库分表-->
<dataHost name="dh_orders_split1" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="ordersSplitW1" url="write1.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="ordersSplitR1" url="read1.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_orders_split2" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="ordersSplitW2" url="write2.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="ordersSplitR2" url="read2.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_orders_split3" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="ordersSplitW3" url="write3.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="ordersSplitR3" url="read3.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_orders_split4" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="ordersSplitW4" url="write4.orders.yohoops.org:3307" password="yh_test" user="yh_vpc_bak">
<readHost host="ordersSplitR4" url="read4.orders.yohoops.org:3307" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<!-- orders 未拆分库 -->
<dataHost name="dh_order_nosplit" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="ordersNosplitW1" url="write.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="ordersNosplitR1" url="read.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_cms" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="cmsW1" url="write.cms.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="cmsR1" url="read.cms.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_passport" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="passportW1" url="write.passport.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="passportR1" url="read.passport.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_shops" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="shopsW1" url="write.shops.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="shopsR1" url="read.shops.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_yohood" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="yohoodW1" url="write.yohood.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="yohoodR1" url="read.yohood.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_yh_extendstore" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="yhExtendstoreW1" url="write.store.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="yhExtendstoreR1" url="read.store.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_yh_unions" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="unionsW1" url="write.yhUnion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="unionsR1" url="read.yhUnion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_uic" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="uicW1" url="write.uic.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="uicR1" url="read.uic.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_message" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="messageW1" url="write.message.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="messageR1" url="read.message.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_yohobuy_logs" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="yohobuyLogsW1" url="yohologs.yohoops:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="yohobuyLogsR1" url="yohologs.yohoops:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
</mycat:schema>