Pinkman-oss commented on issue #28019:
URL:
https://github.com/apache/shardingsphere/issues/28019#issuecomment-1673133767
`dataSources:
backup:
dataSourceClassName: xxxx
driverClassName: xxx
url: xxxx
username: xxx
password: xx
filters: stat
initialSize: 5 #连接池初始化连接数
minIdle: 3 #连接池最小连接数
maxActive: 60 #连接池最大连接数
maxWait: 60000 #配置获取连接等待超时的时间
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis : 300000
validationQuery: SELECT 'x'
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true #打开PSCache,并且指定每个连接上PSCache的大小
maxPoolPreparedStatementPerConnectionSize: 20
removeAbandoned: true
removeAbandonedTimeout: 200
validationQueryTimeout: 200
logAbandoned: true
rules:
- !SINGLE
tables:
- backup.* # 加载该数据源的全部表
defaultDataSource: backup
- !SHARDING
tables: # 数据分片规则配置
t_user: # 逻辑表名称
actualDataNodes : backup.t_user_$->{1..19}
tableStrategy: # 分表策略,同分库策略
hint: # 用于单分片键的hint分片场景
shardingAlgorithmName: hint_rule # 分片算法名称
# 分片算法配置
shardingAlgorithms:
hint_rule: # 分片算法名称
type: HINT_SHARD # 分片算法类型
props:
sql-show: true`
this is my yaml
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]