3,第三章 Sharding-JDBC入门

1、ShardingSphere生态简介

Apache ShardingSphere 是一套开源的分布式数据库解决方案组成的生态圈,核心由: JDBC、Proxy 和 Sidecar(规划中)这 3 款既能够独立部署,又支持混合部署配合使用的产品组成;

功能特性:它们均提供标准化的数据水平扩展分布式事务分布式治理等功能,可适用于如 Java 同构、异构语言、云原生等各种多样化的应用场景。

官方网站:Apache ShardingSphere

文档地址:概览 :: ShardingSphere

本教程主要介绍:Sharding-JDBC;

Sharding-jdbc是ShardingSphere的其中一个模块,定位为==轻量级Java框架==,在Java的JDBC层提供的额外服务。 它使用客户端直连数据库,以jar包形式提供服务,无需额外部署和依赖,可理解为增强版的JDBC驱动,完全兼容JDBC和各种ORM框架

  • 适用于任何基于Java的ORM框架,如:JPA, Hibernate, Mybatis, Spring JDBC Template或直接使用JDBC。

  • 基于任何第三方的数据库连接池,如:DBCP, C3P0, BoneCP, Druid, HikariCP等。

  • 支持任意实现JDBC规范的数据库。目前支持MySQL,Oracle,SQLServer和PostgreSQL。

Sharding-JDBC的核心功能为数据分片读写分离,通过Sharding-JDBC,应用可以透明的使用jdbc访问已经分库分表、读写分离的多个数据源,而不用关心数据源的数量以及数据如何分布。

2、sharding-jdbc相关名词解释

参考官网-核心概念

  • 逻辑表(LogicTable):进行水平拆分的时候同一类型(逻辑、数据结构相同)的表的总称。例:用户数据根据主键尾数拆分为2张表,分别是tab_user_0到tab_user_1,他们的逻辑表名为tab_user。

  • 真实表(ActualTable):在分片的数据库中真实存在的物理表。即上个示例中的tab_user_0到tab_user_1。

  • 数据节点(DataNode):数据分片的最小单元。由数据源名称和数据表组成,例:spring-boot_0.tab_user_0,spring-boot_0.tab_user_1,spring-boot_1.tab_user_0,spring-boot_1.tab_user_1。

    说白了,具体到指定库下的指定表就是一个数据节点;

  • 动态表(DynamicTable):逻辑表和物理表不一定需要在配置规则中静态配置。如,按照日期分片的场景,物理表的名称随着时间的推移会产生变化(股票流水)。

  • 广播表(公共表):指所有的分片数据源中都存在的表,表结构和表中的数据在每个数据库中均完全一致。适用于数据量不大且需要与海量数据的表进行关联查询的场景,例如:字典表。

  • 绑定表(BindingTable):指E。例如:t_order表和t_order_item表,均按照order_no分片,则此两张表互为绑定表关系。绑定表之间的多表关联查询不会出现笛卡尔积关联,关联查询效率将大大提升。举例说明,如果SQL为:

SELECT i.* FROM t_order o JOIN t_order_item i ON o.order_id=i.order_id WHERE o.order_id in (10, 11);

让order的数据落库位置,与order_item落库的位置在同一个数据节点。

在不配置绑定表关系时,假设分片键order_id将数值10路由至第0片,将数值11路由至第1片,那么路由后的SQL应该为4条,它们呈现为笛卡尔积:

SELECT i.* FROM t_order_0 o JOIN t_order_item_0 i ON o.order_id=i.order_id WHERE o.order_id in (10, 11);
 
SELECT i.* FROM t_order_0 o JOIN t_order_item_1 i ON o.order_id=i.order_id WHERE o.order_id in (10, 11);
 
SELECT i.* FROM t_order_1 o JOIN t_order_item_0 i ON o.order_id=i.order_id WHERE o.order_id in (10, 11);

SELECT i.* FROM t_order_1 o JOIN t_order_item_1 i ON o.order_id=i.order_id WHERE o.order_id in (10, 11);

在配置绑定表关系后,路由的SQL应该为2条:

SELECT i.* FROM t_order_0 o JOIN t_order_item_0 i ON o.order_id=i.order_id WHERE o.order_id in (10, 11);
     
SELECT i.* FROM t_order_1 o JOIN t_order_item_1 i ON o.order_id=i.order_id WHERE o.order_id in (10, 11);

  • 其中t_order在FROM的最左侧,ShardingSphere将会以它作为整个绑定表的主表。 所有路由计算将会只使用主表的策略,那么t_order_item表的分片计算将会使用t_order`的条件。故绑定表之间的分区键要完全相同。【解决多表关联查询造成笛卡尔积问题】

  • 分片键(ShardingColumn):分片字段用于将数据库(表)水平拆分的字段,支持单字段及多字段分片。例如上例中的order_id。

    一般在业务中经常查询使用的字段会作为分片键;

3、Sharding-JDBC执行原理

SQL解析

分为词法解析和语法解析。 先通过词法解析器将SQL拆分为一个个不可再分的单词。再使用语法解析器对SQL进行理解,并最终提炼出解析上下文。 解析上下文包括表、选择项、排序项、分组项、聚合函数、分页信息、查询条件以及可能需要修改的占位符的标记。

执行器优化

合并和优化分片条件,如OR等。

SQL路由

根据解析上下文匹配用户配置的分片策略,并生成路由路径。目前支持分片路由和广播路由。

SQL改写

将SQL改写为在真实数据库中可以正确执行的语句。SQL改写分为正确性改写和优化改写。

SQL执行

通过多线程执行器异步执行。

结果归并

将多个执行结果集归并以便于通过统一的JDBC接口输出。结果归并包括流式归并、内存归并和使用装饰者模式的追加归并这几种方式。

参考官网-内部剖析

逻辑表:t_user

物理表:ds0.t_user_1,ds0.t_user_2,ds1.t_user_1,ds1.t_user_2

shardingSphere的3个产品的数据分片主要流程是完全一致的。 核心由SQL解析 => 执行器优化 => SQL路由 => SQL改写 => SQL执行 => 结果归并的流程组成。

例如现在有一条查询语句:

# 此时t_user对应的表是不存在的,是逻辑上表
select * from t_user where id=10 

进行了分库分表操作,2个库ds0,ds1,采用的分片键为id,逻辑表为t_user,真实表为t_user_0、t_user_1两张表,分库、分表算法为均为取余(%2)。

  • sql解析:通过解析sql语句提取分片键列与值进行分片,例如比较符 =、in 、between and,及查询的表等。

  • 执行器优化:合并和优化分片条件,如OR 转化成 in等。

    select * from t_user where id=1 or id=2 or id=3 自动优化:select * from t_user where id in (1,2,3)

  • sql路由:找到sql需要去哪个库、哪个表执行语句,上例sql根据采用的策略可以得到将在ds0库,t_user_0表执行语句。说白了,就是根据逻辑表查找物理表的过程;

  • sql改写:根据解析结果,及采用的分片逻辑改写sql,SQL改写分为正确性改写和优化改写。

    上例经过sql改写后,真实语句为:

select * from ds0.t_user_0 where id=10;==>ds0.t_user_0 2S
select * from ds0.t_user_1 where id=10;==>ds0.t_user_1 2S
select * from ds1.t_user_0 where id=10;==>ds1.t_user_0 2S
select * from ds1.t_user_1 where id=10;==>ds1.t_user_1 2S

  • sql执行:通过多线程执行器异步执行。

  • 结果归并:将多个执行结果集归并以便于通过统一的JDBC接口输出。结果归并包括流式归并、内存归并和使用装饰者模式的追加归并这几种方式;

4、sharding-jdbc分片方式介绍

参考:Spring Boot配置 :: ShardingSphere

sharding-jdbc实现数据分片有4种策略:

  • inline模式

    • 使用最简单,开发成本比较低;

    • 只能使用单个字段作为分片键;

    • 基于行表达式定义分片规则;

通过groovy表达式来表示分库分表的策略;
db0
  ├── t_order0
  └── t_order1
db1
  ├── t_order0
  └── t_order1
  表达式:db${0..1}.t_order${0..1}
  	     t_order${orderId % 2}
  • standard标准分片模式

    • 用户可通过代码自定义复杂的分片策略;

    • 同样只能使用单个字段作为分片键;

  • complex复合分片模式

    • 用于多分片键的复合分片策略(多片键)

  • Hint强制分片模式

    • 不指定片键,通过代码动态指定路由规则

    • 强制分片策略(强制路由)

5、基于inline模式实现水平分表

5.1 水平分表数据准备

order_db_1
  ├── t_order_1
  └── t_order_2

SQL准备

#创建数据库
CREATE DATABASE `order_db_1` CHARACTER SET 'utf8' COLLATE 'utf8_general_ci';
#建表
USE order_db_1;
DROP TABLE IF EXISTS `t_order_1`;
CREATE TABLE `t_order_1` (
    `order_id` BIGINT (20) NOT NULL COMMENT '订单id',
    `price` DECIMAL (10, 2) NOT NULL COMMENT '订单价格',
    `user_id` BIGINT (20) NOT NULL COMMENT '下单用户id',
    `status` VARCHAR (50) CHARACTER
SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '订单状态',
 PRIMARY KEY (`order_id`) USING BTREE
) ENGINE = INNODB CHARACTER
SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

DROP TABLE IF EXISTS `t_order_2`;
CREATE TABLE `t_order_2` (
    `order_id` BIGINT (20) NOT NULL COMMENT '订单id',
    `price` DECIMAL (10, 2) NOT NULL COMMENT '订单价格',
    `user_id` BIGINT (20) NOT NULL COMMENT '下单用户id',
    `status` VARCHAR (50) CHARACTER
SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '订单状态',
 PRIMARY KEY (`order_id`) USING BTREE
) ENGINE = INNODB CHARACTER
SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

5.2 工程集成sharding-jdbc

准备环境:jdk8

导入基础测试工程:day09-分库分表专题\资料\基础代码\ sharding_demo

第一步:测试工程引入核心依赖

<dependencies>
  <dependency>
    <groupId>org.mybatis.spring.boot</groupId>
    <artifactId>mybatis-spring-boot-starter</artifactId>
    <version>2.1.4</version>
  </dependency>
  <!--引入sharding依赖-->
  <dependency>
    <groupId>org.apache.shardingsphere</groupId>
    <artifactId>sharding-jdbc-spring-boot-starter</artifactId>
    <version>4.0.0-RC1</version>
  </dependency>

  <dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>druid</artifactId>
    <version>1.2.8</version>
  </dependency>
</dependencies>

第二步:定义sharding相关配置

1) 主配置

# 应用名称
spring.application.name=sharding_all
#下面这些内容是为了让MyBatis映射
#指定Mybatis的Mapper文件
mybatis.mapper-locations=classpath:mappers/*xml
#指定Mybatis的实体目录
mybatis.type-aliases-package=com.sharding.inline.pojo
spring.profiles.active=test1

2) 环境application-test1.properties配置

# 分表配置
# 数据源名称,多数据源以逗号分隔
spring.shardingsphere.datasource.names=ds1
# 数据库连接池类名称
spring.shardingsphere.datasource.ds1.type=com.alibaba.druid.pool.DruidDataSource
# 数据库驱动类名
spring.shardingsphere.datasource.ds1.driver-class-name=com.mysql.cj.jdbc.Driver
# 数据库 url 连接
spring.shardingsphere.datasource.ds1.url=jdbc:mysql://localhost:3306/order_db_1?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai
# 数据库用户名
spring.shardingsphere.datasource.ds1.username=root
# 数据库密码
spring.shardingsphere.datasource.ds1.password=root
# 数据库连接池的其它属性
#spring.shardingsphere.datasource.ds1.xxx=


#spring.shardingsphere.sharding.tables.<logic-table-name>.actual-data-nodes=#由数据源名 + 表名组成,以小数点分隔。多个表以逗号分隔,支持inline表达式。缺省表示使用已知数据源与逻辑表名称生成数据节点,
# 用于广播表(即每个库中都需要一个同样的表用于关联查询,多为字典表)或只分库不分表且所有库的表结构完全一致的情况,<logic-table-name>代表逻辑表的表名

#ds1.t_order_$->{1..2}意思是ds1下的t_order_1,t_order_2这2张表,$是占位符,1..2表示1到2的整数
spring.shardingsphere.sharding.tables.t_order.actual-data-nodes=ds1.t_order_$->{1..2}

#行表达式分片策略
#spring.shardingsphere.sharding.tables.<logic-table-name>.table-strategy.inline.sharding-column= #分片列名称
spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.sharding-column=order_id

#spring.shardingsphere.sharding.tables.<logic-table-name>.table-strategy.inline.algorithm-expression= #分片算法行表达式,需符合groovy语法

spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.algorithm-expression=t_order_$->{order_id % 2 +1}

3) 定义mapper接口和xml

package com.itheima.shardingjdbc.mapper;

import com.itheima.shardingjdbc.pojo.TOrder;
import org.apache.ibatis.annotations.Mapper;

/**
 * @Entity com.itheima.shardingjdbc.pojo.TOrder
 */
@Mapper
public interface TOrderMapper {

    int deleteByPrimaryKey(Long id);

    int insert(TOrder record);

    int insertSelective(TOrder record);

    TOrder selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(TOrder record);

    int updateByPrimaryKey(TOrder record);

}

定义与接口绑定的xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.itheima.shardingjdbc.mapper.TOrderMapper">

    <resultMap id="BaseResultMap" type="com.itheima.shardingjdbc.pojo.TOrder">
            <id property="orderId" column="order_id" jdbcType="BIGINT"/>
            <result property="price" column="price" jdbcType="DECIMAL"/>
            <result property="userId" column="user_id" jdbcType="BIGINT"/>
            <result property="status" column="status" jdbcType="VARCHAR"/>
    </resultMap>

    <sql id="Base_Column_List">
        order_id,price,user_id,
        status
    </sql>

    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from t_order
        where  order_id = #{orderId,jdbcType=BIGINT} 
    </select>

    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
        delete from t_order
        where  order_id = #{orderId,jdbcType=BIGINT} 
    </delete>
    <insert id="insert" parameterType="com.itheima.shardingjdbc.pojo.TOrder">
        insert into t_order
        ( order_id,price,user_id
        ,status)
        values (#{orderId,jdbcType=BIGINT},#{price,jdbcType=DECIMAL},#{userId,jdbcType=BIGINT}
        ,#{status,jdbcType=VARCHAR})
    </insert>
    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.itheima.shardingjdbc.pojo.TOrder" useGeneratedKeys="true">
        insert into t_order
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="orderId != null">orderId,</if>
                <if test="price != null">price,</if>
                <if test="userId != null">userId,</if>
                <if test="status != null">status,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="orderId != null">order_id = #{orderId,jdbcType=BIGINT},</if>
                <if test="price != null">price = #{price,jdbcType=DECIMAL},</if>
                <if test="userId != null">user_id = #{userId,jdbcType=BIGINT},</if>
                <if test="status != null">status = #{status,jdbcType=VARCHAR},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.itheima.shardingjdbc.pojo.TOrder">
        update t_order
        <set>
                <if test="price != null">
                    price = #{price,jdbcType=DECIMAL},
                </if>
                <if test="userId != null">
                    user_id = #{userId,jdbcType=BIGINT},
                </if>
                <if test="status != null">
                    status = #{status,jdbcType=VARCHAR},
                </if>
        </set>
        where   order_id = #{orderId,jdbcType=BIGINT} 
    </update>
    <update id="updateByPrimaryKey" parameterType="com.itheima.shardingjdbc.pojo.TOrder">
        update t_order
        set 
            price =  #{price,jdbcType=DECIMAL},
            user_id =  #{userId,jdbcType=BIGINT},
            status =  #{status,jdbcType=VARCHAR}
        where   order_id = #{orderId,jdbcType=BIGINT} 
    </update>
</mapper>

注意:xml中使用的逻辑表t_order,而不是t_order1、t_order2

4) 测试

@SpringBootTest
public class TestAll {

    @Autowired
    private TOrderMapper tOrderMapper;
    @Test
   public void test1() {
        int orderId=0;
        Random random = new Random();
        for (int i = 0; i < 20; i++) {
            //保证随机生成奇数或者偶数
            orderId+=random.nextInt(2)+1;
            TOrder order = TOrder.builder().orderId(Long.valueOf(orderId))
                    .userId(Long.valueOf(i))
                    .status("1")
                    .price(new BigDecimal(300))
                    .build();
            tOrderMapper.insert(order);
        }
    }
}

运行完查看数据库数据 

order_id为偶数的找t_order_1表 

因为上面的test1文件中

#spring.shardingsphere.sharding.tables.<logic-table-name>.database-strategy.inline.algorithm-expression= #分片算法行表达式,需符合groovy语法
spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.algorithm-expression=t_order_$->{order_id % 2 +1}

这行代码 

 order_id为奇数的找t_order_2表

查看控制台打印的sql

2024-01-10 22:25:22.783  INFO 12828 --- [           main] ShardingSphere-SQL                       : Rule Type: sharding
2024-01-10 22:25:22.786  INFO 12828 --- [           main] ShardingSphere-SQL                       : Logic SQL: insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)
2024-01-10 22:25:22.787  INFO 12828 --- [           main] ShardingSphere-SQL                       : SQLStatement: InsertStatement(super=DMLStatement(super=AbstractSQLStatement(type=DML, tables=Tables(tables=[Table(name=t_order, alias=Optional.absent())]), routeConditions=Conditions(orCondition=OrCondition(andConditions=[AndCondition(conditions=[Condition(column=Column(name=order_id, tableName=t_order), operator=EQUAL, compareOperator=null, positionValueMap={}, positionIndexMap={0=0})])])), encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])), sqlTokens=[TableToken(tableName=t_order, quoteCharacter=NONE, schemaNameLength=0), SQLToken(startIndex=28)], parametersIndex=4, logicSQL=insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)), deleteStatement=false, updateTableAlias={}, updateColumnValues={}, whereStartIndex=0, whereStopIndex=0, whereParameterStartIndex=0, whereParameterEndIndex=0), columnNames=[order_id, price, user_id, status], values=[InsertValue(columnValues=[org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@73afe2b7, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@9687f55, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@5700c9db, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@671d03bb])])
2024-01-10 22:25:22.787  INFO 12828 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds1 ::: insert into t_order_2
         (order_id, price, user_id, status) VALUES (?, ?, ?, ?) ::: [1, 300, 0, 1]
2024-01-10 22:25:22.831  INFO 12828 --- [           main] ShardingSphere-SQL                       : Rule Type: sharding
2024-01-10 22:25:22.831  INFO 12828 --- [           main] ShardingSphere-SQL                       : Logic SQL: insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)
2024-01-10 22:25:22.831  INFO 12828 --- [           main] ShardingSphere-SQL                       : SQLStatement: InsertStatement(super=DMLStatement(super=AbstractSQLStatement(type=DML, tables=Tables(tables=[Table(name=t_order, alias=Optional.absent())]), routeConditions=Conditions(orCondition=OrCondition(andConditions=[AndCondition(conditions=[Condition(column=Column(name=order_id, tableName=t_order), operator=EQUAL, compareOperator=null, positionValueMap={}, positionIndexMap={0=0})])])), encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])), sqlTokens=[TableToken(tableName=t_order, quoteCharacter=NONE, schemaNameLength=0), SQLToken(startIndex=28)], parametersIndex=4, logicSQL=insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)), deleteStatement=false, updateTableAlias={}, updateColumnValues={}, whereStartIndex=0, whereStopIndex=0, whereParameterStartIndex=0, whereParameterEndIndex=0), columnNames=[order_id, price, user_id, status], values=[InsertValue(columnValues=[org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@73afe2b7, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@9687f55, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@5700c9db, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@671d03bb])])
2024-01-10 22:25:22.831  INFO 12828 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds1 ::: insert into t_order_1
         (order_id, price, user_id, status) VALUES (?, ?, ?, ?) ::: [2, 300, 1, 1]
2024-01-10 22:25:22.838  INFO 12828 --- [           main] ShardingSphere-SQL                       : Rule Type: sharding
2024-01-10 22:25:22.839  INFO 12828 --- [           main] ShardingSphere-SQL                       : Logic SQL: insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)
2024-01-10 22:25:22.839  INFO 12828 --- [           main] ShardingSphere-SQL                       : SQLStatement: InsertStatement(super=DMLStatement(super=AbstractSQLStatement(type=DML, tables=Tables(tables=[Table(name=t_order, alias=Optional.absent())]), routeConditions=Conditions(orCondition=OrCondition(andConditions=[AndCondition(conditions=[Condition(column=Column(name=order_id, tableName=t_order), operator=EQUAL, compareOperator=null, positionValueMap={}, positionIndexMap={0=0})])])), encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])), sqlTokens=[TableToken(tableName=t_order, quoteCharacter=NONE, schemaNameLength=0), SQLToken(startIndex=28)], parametersIndex=4, logicSQL=insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)), deleteStatement=false, updateTableAlias={}, updateColumnValues={}, whereStartIndex=0, whereStopIndex=0, whereParameterStartIndex=0, whereParameterEndIndex=0), columnNames=[order_id, price, user_id, status], values=[InsertValue(columnValues=[org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@73afe2b7, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@9687f55, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@5700c9db, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@671d03bb])])
2024-01-10 22:25:22.839  INFO 12828 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds1 ::: insert into t_order_2
         (order_id, price, user_id, status) VALUES (?, ?, ?, ?) ::: [3, 300, 2, 1]
2024-01-10 22:25:22.844  INFO 12828 --- [           main] ShardingSphere-SQL                       : Rule Type: sharding
2024-01-10 22:25:22.844  INFO 12828 --- [           main] ShardingSphere-SQL                       : Logic SQL: insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)
2024-01-10 22:25:22.844  INFO 12828 --- [           main] ShardingSphere-SQL                       : SQLStatement: InsertStatement(super=DMLStatement(super=AbstractSQLStatement(type=DML, tables=Tables(tables=[Table(name=t_order, alias=Optional.absent())]), routeConditions=Conditions(orCondition=OrCondition(andConditions=[AndCondition(conditions=[Condition(column=Column(name=order_id, tableName=t_order), operator=EQUAL, compareOperator=null, positionValueMap={}, positionIndexMap={0=0})])])), encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])), sqlTokens=[TableToken(tableName=t_order, quoteCharacter=NONE, schemaNameLength=0), SQLToken(startIndex=28)], parametersIndex=4, logicSQL=insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)), deleteStatement=false, updateTableAlias={}, updateColumnValues={}, whereStartIndex=0, whereStopIndex=0, whereParameterStartIndex=0, whereParameterEndIndex=0), columnNames=[order_id, price, user_id, status], values=[InsertValue(columnValues=[org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@73afe2b7, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@9687f55, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@5700c9db, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@671d03bb])])
2024-01-10 22:25:22.846  INFO 12828 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds1 ::: insert into t_order_2
         (order_id, price, user_id, status) VALUES (?, ?, ?, ?) ::: [5, 300, 3, 1]
2024-01-10 22:25:22.852  INFO 12828 --- [           main] ShardingSphere-SQL                       : Rule Type: sharding
2024-01-10 22:25:22.854  INFO 12828 --- [           main] ShardingSphere-SQL                       : Logic SQL: insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)
2024-01-10 22:25:22.854  INFO 12828 --- [           main] ShardingSphere-SQL                       : SQLStatement: InsertStatement(super=DMLStatement(super=AbstractSQLStatement(type=DML, tables=Tables(tables=[Table(name=t_order, alias=Optional.absent())]), routeConditions=Conditions(orCondition=OrCondition(andConditions=[AndCondition(conditions=[Condition(column=Column(name=order_id, tableName=t_order), operator=EQUAL, compareOperator=null, positionValueMap={}, positionIndexMap={0=0})])])), encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])), sqlTokens=[TableToken(tableName=t_order, quoteCharacter=NONE, schemaNameLength=0), SQLToken(startIndex=28)], parametersIndex=4, logicSQL=insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)), deleteStatement=false, updateTableAlias={}, updateColumnValues={}, whereStartIndex=0, whereStopIndex=0, whereParameterStartIndex=0, whereParameterEndIndex=0), columnNames=[order_id, price, user_id, status], values=[InsertValue(columnValues=[org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@73afe2b7, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@9687f55, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@5700c9db, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@671d03bb])])
2024-01-10 22:25:22.854  INFO 12828 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds1 ::: insert into t_order_1
         (order_id, price, user_id, status) VALUES (?, ?, ?, ?) ::: [6, 300, 4, 1]
2024-01-10 22:25:22.860  INFO 12828 --- [           main] ShardingSphere-SQL                       : Rule Type: sharding
2024-01-10 22:25:22.860  INFO 12828 --- [           main] ShardingSphere-SQL                       : Logic SQL: insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)
2024-01-10 22:25:22.860  INFO 12828 --- [           main] ShardingSphere-SQL                       : SQLStatement: InsertStatement(super=DMLStatement(super=AbstractSQLStatement(type=DML, tables=Tables(tables=[Table(name=t_order, alias=Optional.absent())]), routeConditions=Conditions(orCondition=OrCondition(andConditions=[AndCondition(conditions=[Condition(column=Column(name=order_id, tableName=t_order), operator=EQUAL, compareOperator=null, positionValueMap={}, positionIndexMap={0=0})])])), encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])), sqlTokens=[TableToken(tableName=t_order, quoteCharacter=NONE, schemaNameLength=0), SQLToken(startIndex=28)], parametersIndex=4, logicSQL=insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)), deleteStatement=false, updateTableAlias={}, updateColumnValues={}, whereStartIndex=0, whereStopIndex=0, whereParameterStartIndex=0, whereParameterEndIndex=0), columnNames=[order_id, price, user_id, status], values=[InsertValue(columnValues=[org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@73afe2b7, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@9687f55, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@5700c9db, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@671d03bb])])
2024-01-10 22:25:22.860  INFO 12828 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds1 ::: insert into t_order_1
         (order_id, price, user_id, status) VALUES (?, ?, ?, ?) ::: [8, 300, 5, 1]
2024-01-10 22:25:22.864  INFO 12828 --- [           main] ShardingSphere-SQL                       : Rule Type: sharding
2024-01-10 22:25:22.864  INFO 12828 --- [           main] ShardingSphere-SQL                       : Logic SQL: insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)
2024-01-10 22:25:22.864  INFO 12828 --- [           main] ShardingSphere-SQL                       : SQLStatement: InsertStatement(super=DMLStatement(super=AbstractSQLStatement(type=DML, tables=Tables(tables=[Table(name=t_order, alias=Optional.absent())]), routeConditions=Conditions(orCondition=OrCondition(andConditions=[AndCondition(conditions=[Condition(column=Column(name=order_id, tableName=t_order), operator=EQUAL, compareOperator=null, positionValueMap={}, positionIndexMap={0=0})])])), encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])), sqlTokens=[TableToken(tableName=t_order, quoteCharacter=NONE, schemaNameLength=0), SQLToken(startIndex=28)], parametersIndex=4, logicSQL=insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)), deleteStatement=false, updateTableAlias={}, updateColumnValues={}, whereStartIndex=0, whereStopIndex=0, whereParameterStartIndex=0, whereParameterEndIndex=0), columnNames=[order_id, price, user_id, status], values=[InsertValue(columnValues=[org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@73afe2b7, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@9687f55, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@5700c9db, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@671d03bb])])
2024-01-10 22:25:22.864  INFO 12828 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds1 ::: insert into t_order_2
         (order_id, price, user_id, status) VALUES (?, ?, ?, ?) ::: [9, 300, 6, 1]
2024-01-10 22:25:22.871  INFO 12828 --- [           main] ShardingSphere-SQL                       : Rule Type: sharding
2024-01-10 22:25:22.871  INFO 12828 --- [           main] ShardingSphere-SQL                       : Logic SQL: insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)
2024-01-10 22:25:22.871  INFO 12828 --- [           main] ShardingSphere-SQL                       : SQLStatement: InsertStatement(super=DMLStatement(super=AbstractSQLStatement(type=DML, tables=Tables(tables=[Table(name=t_order, alias=Optional.absent())]), routeConditions=Conditions(orCondition=OrCondition(andConditions=[AndCondition(conditions=[Condition(column=Column(name=order_id, tableName=t_order), operator=EQUAL, compareOperator=null, positionValueMap={}, positionIndexMap={0=0})])])), encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])), sqlTokens=[TableToken(tableName=t_order, quoteCharacter=NONE, schemaNameLength=0), SQLToken(startIndex=28)], parametersIndex=4, logicSQL=insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)), deleteStatement=false, updateTableAlias={}, updateColumnValues={}, whereStartIndex=0, whereStopIndex=0, whereParameterStartIndex=0, whereParameterEndIndex=0), columnNames=[order_id, price, user_id, status], values=[InsertValue(columnValues=[org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@73afe2b7, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@9687f55, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@5700c9db, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@671d03bb])])
2024-01-10 22:25:22.871  INFO 12828 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds1 ::: insert into t_order_1
         (order_id, price, user_id, status) VALUES (?, ?, ?, ?) ::: [10, 300, 7, 1]
2024-01-10 22:25:22.877  INFO 12828 --- [           main] ShardingSphere-SQL                       : Rule Type: sharding
2024-01-10 22:25:22.877  INFO 12828 --- [           main] ShardingSphere-SQL                       : Logic SQL: insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)
2024-01-10 22:25:22.877  INFO 12828 --- [           main] ShardingSphere-SQL                       : SQLStatement: InsertStatement(super=DMLStatement(super=AbstractSQLStatement(type=DML, tables=Tables(tables=[Table(name=t_order, alias=Optional.absent())]), routeConditions=Conditions(orCondition=OrCondition(andConditions=[AndCondition(conditions=[Condition(column=Column(name=order_id, tableName=t_order), operator=EQUAL, compareOperator=null, positionValueMap={}, positionIndexMap={0=0})])])), encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])), sqlTokens=[TableToken(tableName=t_order, quoteCharacter=NONE, schemaNameLength=0), SQLToken(startIndex=28)], parametersIndex=4, logicSQL=insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)), deleteStatement=false, updateTableAlias={}, updateColumnValues={}, whereStartIndex=0, whereStopIndex=0, whereParameterStartIndex=0, whereParameterEndIndex=0), columnNames=[order_id, price, user_id, status], values=[InsertValue(columnValues=[org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@73afe2b7, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@9687f55, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@5700c9db, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@671d03bb])])
2024-01-10 22:25:22.877  INFO 12828 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds1 ::: insert into t_order_1
         (order_id, price, user_id, status) VALUES (?, ?, ?, ?) ::: [12, 300, 8, 1]
2024-01-10 22:25:22.883  INFO 12828 --- [           main] ShardingSphere-SQL                       : Rule Type: sharding
2024-01-10 22:25:22.884  INFO 12828 --- [           main] ShardingSphere-SQL                       : Logic SQL: insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)
2024-01-10 22:25:22.884  INFO 12828 --- [           main] ShardingSphere-SQL                       : SQLStatement: InsertStatement(super=DMLStatement(super=AbstractSQLStatement(type=DML, tables=Tables(tables=[Table(name=t_order, alias=Optional.absent())]), routeConditions=Conditions(orCondition=OrCondition(andConditions=[AndCondition(conditions=[Condition(column=Column(name=order_id, tableName=t_order), operator=EQUAL, compareOperator=null, positionValueMap={}, positionIndexMap={0=0})])])), encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])), sqlTokens=[TableToken(tableName=t_order, quoteCharacter=NONE, schemaNameLength=0), SQLToken(startIndex=28)], parametersIndex=4, logicSQL=insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)), deleteStatement=false, updateTableAlias={}, updateColumnValues={}, whereStartIndex=0, whereStopIndex=0, whereParameterStartIndex=0, whereParameterEndIndex=0), columnNames=[order_id, price, user_id, status], values=[InsertValue(columnValues=[org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@73afe2b7, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@9687f55, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@5700c9db, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@671d03bb])])
2024-01-10 22:25:22.884  INFO 12828 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds1 ::: insert into t_order_2
         (order_id, price, user_id, status) VALUES (?, ?, ?, ?) ::: [13, 300, 9, 1]
2024-01-10 22:25:22.891  INFO 12828 --- [           main] ShardingSphere-SQL                       : Rule Type: sharding
2024-01-10 22:25:22.892  INFO 12828 --- [           main] ShardingSphere-SQL                       : Logic SQL: insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)
2024-01-10 22:25:22.892  INFO 12828 --- [           main] ShardingSphere-SQL                       : SQLStatement: InsertStatement(super=DMLStatement(super=AbstractSQLStatement(type=DML, tables=Tables(tables=[Table(name=t_order, alias=Optional.absent())]), routeConditions=Conditions(orCondition=OrCondition(andConditions=[AndCondition(conditions=[Condition(column=Column(name=order_id, tableName=t_order), operator=EQUAL, compareOperator=null, positionValueMap={}, positionIndexMap={0=0})])])), encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])), sqlTokens=[TableToken(tableName=t_order, quoteCharacter=NONE, schemaNameLength=0), SQLToken(startIndex=28)], parametersIndex=4, logicSQL=insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)), deleteStatement=false, updateTableAlias={}, updateColumnValues={}, whereStartIndex=0, whereStopIndex=0, whereParameterStartIndex=0, whereParameterEndIndex=0), columnNames=[order_id, price, user_id, status], values=[InsertValue(columnValues=[org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@73afe2b7, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@9687f55, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@5700c9db, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@671d03bb])])
2024-01-10 22:25:22.893  INFO 12828 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds1 ::: insert into t_order_2
         (order_id, price, user_id, status) VALUES (?, ?, ?, ?) ::: [15, 300, 10, 1]
2024-01-10 22:25:22.899  INFO 12828 --- [           main] ShardingSphere-SQL                       : Rule Type: sharding
2024-01-10 22:25:22.900  INFO 12828 --- [           main] ShardingSphere-SQL                       : Logic SQL: insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)
2024-01-10 22:25:22.900  INFO 12828 --- [           main] ShardingSphere-SQL                       : SQLStatement: InsertStatement(super=DMLStatement(super=AbstractSQLStatement(type=DML, tables=Tables(tables=[Table(name=t_order, alias=Optional.absent())]), routeConditions=Conditions(orCondition=OrCondition(andConditions=[AndCondition(conditions=[Condition(column=Column(name=order_id, tableName=t_order), operator=EQUAL, compareOperator=null, positionValueMap={}, positionIndexMap={0=0})])])), encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])), sqlTokens=[TableToken(tableName=t_order, quoteCharacter=NONE, schemaNameLength=0), SQLToken(startIndex=28)], parametersIndex=4, logicSQL=insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)), deleteStatement=false, updateTableAlias={}, updateColumnValues={}, whereStartIndex=0, whereStopIndex=0, whereParameterStartIndex=0, whereParameterEndIndex=0), columnNames=[order_id, price, user_id, status], values=[InsertValue(columnValues=[org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@73afe2b7, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@9687f55, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@5700c9db, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@671d03bb])])
2024-01-10 22:25:22.900  INFO 12828 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds1 ::: insert into t_order_1
         (order_id, price, user_id, status) VALUES (?, ?, ?, ?) ::: [16, 300, 11, 1]
2024-01-10 22:25:22.906  INFO 12828 --- [           main] ShardingSphere-SQL                       : Rule Type: sharding
2024-01-10 22:25:22.906  INFO 12828 --- [           main] ShardingSphere-SQL                       : Logic SQL: insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)
2024-01-10 22:25:22.906  INFO 12828 --- [           main] ShardingSphere-SQL                       : SQLStatement: InsertStatement(super=DMLStatement(super=AbstractSQLStatement(type=DML, tables=Tables(tables=[Table(name=t_order, alias=Optional.absent())]), routeConditions=Conditions(orCondition=OrCondition(andConditions=[AndCondition(conditions=[Condition(column=Column(name=order_id, tableName=t_order), operator=EQUAL, compareOperator=null, positionValueMap={}, positionIndexMap={0=0})])])), encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])), sqlTokens=[TableToken(tableName=t_order, quoteCharacter=NONE, schemaNameLength=0), SQLToken(startIndex=28)], parametersIndex=4, logicSQL=insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)), deleteStatement=false, updateTableAlias={}, updateColumnValues={}, whereStartIndex=0, whereStopIndex=0, whereParameterStartIndex=0, whereParameterEndIndex=0), columnNames=[order_id, price, user_id, status], values=[InsertValue(columnValues=[org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@73afe2b7, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@9687f55, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@5700c9db, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@671d03bb])])
2024-01-10 22:25:22.906  INFO 12828 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds1 ::: insert into t_order_2
         (order_id, price, user_id, status) VALUES (?, ?, ?, ?) ::: [17, 300, 12, 1]
2024-01-10 22:25:22.912  INFO 12828 --- [           main] ShardingSphere-SQL                       : Rule Type: sharding
2024-01-10 22:25:22.912  INFO 12828 --- [           main] ShardingSphere-SQL                       : Logic SQL: insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)
2024-01-10 22:25:22.912  INFO 12828 --- [           main] ShardingSphere-SQL                       : SQLStatement: InsertStatement(super=DMLStatement(super=AbstractSQLStatement(type=DML, tables=Tables(tables=[Table(name=t_order, alias=Optional.absent())]), routeConditions=Conditions(orCondition=OrCondition(andConditions=[AndCondition(conditions=[Condition(column=Column(name=order_id, tableName=t_order), operator=EQUAL, compareOperator=null, positionValueMap={}, positionIndexMap={0=0})])])), encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])), sqlTokens=[TableToken(tableName=t_order, quoteCharacter=NONE, schemaNameLength=0), SQLToken(startIndex=28)], parametersIndex=4, logicSQL=insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)), deleteStatement=false, updateTableAlias={}, updateColumnValues={}, whereStartIndex=0, whereStopIndex=0, whereParameterStartIndex=0, whereParameterEndIndex=0), columnNames=[order_id, price, user_id, status], values=[InsertValue(columnValues=[org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@73afe2b7, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@9687f55, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@5700c9db, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@671d03bb])])
2024-01-10 22:25:22.912  INFO 12828 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds1 ::: insert into t_order_2
         (order_id, price, user_id, status) VALUES (?, ?, ?, ?) ::: [19, 300, 13, 1]
2024-01-10 22:25:22.927  INFO 12828 --- [           main] ShardingSphere-SQL                       : Rule Type: sharding
2024-01-10 22:25:22.927  INFO 12828 --- [           main] ShardingSphere-SQL                       : Logic SQL: insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)
2024-01-10 22:25:22.927  INFO 12828 --- [           main] ShardingSphere-SQL                       : SQLStatement: InsertStatement(super=DMLStatement(super=AbstractSQLStatement(type=DML, tables=Tables(tables=[Table(name=t_order, alias=Optional.absent())]), routeConditions=Conditions(orCondition=OrCondition(andConditions=[AndCondition(conditions=[Condition(column=Column(name=order_id, tableName=t_order), operator=EQUAL, compareOperator=null, positionValueMap={}, positionIndexMap={0=0})])])), encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])), sqlTokens=[TableToken(tableName=t_order, quoteCharacter=NONE, schemaNameLength=0), SQLToken(startIndex=28)], parametersIndex=4, logicSQL=insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)), deleteStatement=false, updateTableAlias={}, updateColumnValues={}, whereStartIndex=0, whereStopIndex=0, whereParameterStartIndex=0, whereParameterEndIndex=0), columnNames=[order_id, price, user_id, status], values=[InsertValue(columnValues=[org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@73afe2b7, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@9687f55, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@5700c9db, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@671d03bb])])
2024-01-10 22:25:22.927  INFO 12828 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds1 ::: insert into t_order_1
         (order_id, price, user_id, status) VALUES (?, ?, ?, ?) ::: [20, 300, 14, 1]
2024-01-10 22:25:22.933  INFO 12828 --- [           main] ShardingSphere-SQL                       : Rule Type: sharding
2024-01-10 22:25:22.933  INFO 12828 --- [           main] ShardingSphere-SQL                       : Logic SQL: insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)
2024-01-10 22:25:22.933  INFO 12828 --- [           main] ShardingSphere-SQL                       : SQLStatement: InsertStatement(super=DMLStatement(super=AbstractSQLStatement(type=DML, tables=Tables(tables=[Table(name=t_order, alias=Optional.absent())]), routeConditions=Conditions(orCondition=OrCondition(andConditions=[AndCondition(conditions=[Condition(column=Column(name=order_id, tableName=t_order), operator=EQUAL, compareOperator=null, positionValueMap={}, positionIndexMap={0=0})])])), encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])), sqlTokens=[TableToken(tableName=t_order, quoteCharacter=NONE, schemaNameLength=0), SQLToken(startIndex=28)], parametersIndex=4, logicSQL=insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)), deleteStatement=false, updateTableAlias={}, updateColumnValues={}, whereStartIndex=0, whereStopIndex=0, whereParameterStartIndex=0, whereParameterEndIndex=0), columnNames=[order_id, price, user_id, status], values=[InsertValue(columnValues=[org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@73afe2b7, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@9687f55, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@5700c9db, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@671d03bb])])
2024-01-10 22:25:22.933  INFO 12828 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds1 ::: insert into t_order_1
         (order_id, price, user_id, status) VALUES (?, ?, ?, ?) ::: [22, 300, 15, 1]
2024-01-10 22:25:22.940  INFO 12828 --- [           main] ShardingSphere-SQL                       : Rule Type: sharding
2024-01-10 22:25:22.941  INFO 12828 --- [           main] ShardingSphere-SQL                       : Logic SQL: insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)
2024-01-10 22:25:22.941  INFO 12828 --- [           main] ShardingSphere-SQL                       : SQLStatement: InsertStatement(super=DMLStatement(super=AbstractSQLStatement(type=DML, tables=Tables(tables=[Table(name=t_order, alias=Optional.absent())]), routeConditions=Conditions(orCondition=OrCondition(andConditions=[AndCondition(conditions=[Condition(column=Column(name=order_id, tableName=t_order), operator=EQUAL, compareOperator=null, positionValueMap={}, positionIndexMap={0=0})])])), encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])), sqlTokens=[TableToken(tableName=t_order, quoteCharacter=NONE, schemaNameLength=0), SQLToken(startIndex=28)], parametersIndex=4, logicSQL=insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)), deleteStatement=false, updateTableAlias={}, updateColumnValues={}, whereStartIndex=0, whereStopIndex=0, whereParameterStartIndex=0, whereParameterEndIndex=0), columnNames=[order_id, price, user_id, status], values=[InsertValue(columnValues=[org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@73afe2b7, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@9687f55, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@5700c9db, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@671d03bb])])
2024-01-10 22:25:22.941  INFO 12828 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds1 ::: insert into t_order_1
         (order_id, price, user_id, status) VALUES (?, ?, ?, ?) ::: [24, 300, 16, 1]
2024-01-10 22:25:22.948  INFO 12828 --- [           main] ShardingSphere-SQL                       : Rule Type: sharding
2024-01-10 22:25:22.948  INFO 12828 --- [           main] ShardingSphere-SQL                       : Logic SQL: insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)
2024-01-10 22:25:22.949  INFO 12828 --- [           main] ShardingSphere-SQL                       : SQLStatement: InsertStatement(super=DMLStatement(super=AbstractSQLStatement(type=DML, tables=Tables(tables=[Table(name=t_order, alias=Optional.absent())]), routeConditions=Conditions(orCondition=OrCondition(andConditions=[AndCondition(conditions=[Condition(column=Column(name=order_id, tableName=t_order), operator=EQUAL, compareOperator=null, positionValueMap={}, positionIndexMap={0=0})])])), encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])), sqlTokens=[TableToken(tableName=t_order, quoteCharacter=NONE, schemaNameLength=0), SQLToken(startIndex=28)], parametersIndex=4, logicSQL=insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)), deleteStatement=false, updateTableAlias={}, updateColumnValues={}, whereStartIndex=0, whereStopIndex=0, whereParameterStartIndex=0, whereParameterEndIndex=0), columnNames=[order_id, price, user_id, status], values=[InsertValue(columnValues=[org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@73afe2b7, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@9687f55, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@5700c9db, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@671d03bb])])
2024-01-10 22:25:22.951  INFO 12828 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds1 ::: insert into t_order_2
         (order_id, price, user_id, status) VALUES (?, ?, ?, ?) ::: [25, 300, 17, 1]
2024-01-10 22:25:22.958  INFO 12828 --- [           main] ShardingSphere-SQL                       : Rule Type: sharding
2024-01-10 22:25:22.958  INFO 12828 --- [           main] ShardingSphere-SQL                       : Logic SQL: insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)
2024-01-10 22:25:22.958  INFO 12828 --- [           main] ShardingSphere-SQL                       : SQLStatement: InsertStatement(super=DMLStatement(super=AbstractSQLStatement(type=DML, tables=Tables(tables=[Table(name=t_order, alias=Optional.absent())]), routeConditions=Conditions(orCondition=OrCondition(andConditions=[AndCondition(conditions=[Condition(column=Column(name=order_id, tableName=t_order), operator=EQUAL, compareOperator=null, positionValueMap={}, positionIndexMap={0=0})])])), encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])), sqlTokens=[TableToken(tableName=t_order, quoteCharacter=NONE, schemaNameLength=0), SQLToken(startIndex=28)], parametersIndex=4, logicSQL=insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)), deleteStatement=false, updateTableAlias={}, updateColumnValues={}, whereStartIndex=0, whereStopIndex=0, whereParameterStartIndex=0, whereParameterEndIndex=0), columnNames=[order_id, price, user_id, status], values=[InsertValue(columnValues=[org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@73afe2b7, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@9687f55, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@5700c9db, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@671d03bb])])
2024-01-10 22:25:22.958  INFO 12828 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds1 ::: insert into t_order_1
         (order_id, price, user_id, status) VALUES (?, ?, ?, ?) ::: [26, 300, 18, 1]
2024-01-10 22:25:22.964  INFO 12828 --- [           main] ShardingSphere-SQL                       : Rule Type: sharding
2024-01-10 22:25:22.965  INFO 12828 --- [           main] ShardingSphere-SQL                       : Logic SQL: insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)
2024-01-10 22:25:22.965  INFO 12828 --- [           main] ShardingSphere-SQL                       : SQLStatement: InsertStatement(super=DMLStatement(super=AbstractSQLStatement(type=DML, tables=Tables(tables=[Table(name=t_order, alias=Optional.absent())]), routeConditions=Conditions(orCondition=OrCondition(andConditions=[AndCondition(conditions=[Condition(column=Column(name=order_id, tableName=t_order), operator=EQUAL, compareOperator=null, positionValueMap={}, positionIndexMap={0=0})])])), encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])), sqlTokens=[TableToken(tableName=t_order, quoteCharacter=NONE, schemaNameLength=0), SQLToken(startIndex=28)], parametersIndex=4, logicSQL=insert into t_order
        ( order_id,price,user_id
        ,status)
        values (?,?,?
        ,?)), deleteStatement=false, updateTableAlias={}, updateColumnValues={}, whereStartIndex=0, whereStopIndex=0, whereParameterStartIndex=0, whereParameterEndIndex=0), columnNames=[order_id, price, user_id, status], values=[InsertValue(columnValues=[org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@73afe2b7, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@9687f55, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@5700c9db, org.apache.shardingsphere.core.parse.old.parser.expression.SQLPlaceholderExpression@671d03bb])])
2024-01-10 22:25:22.965  INFO 12828 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds1 ::: insert into t_order_1
         (order_id, price, user_id, status) VALUES (?, ?, ?, ?) ::: [28, 300, 19, 1]
2024-01-10 22:25:23.378  INFO 12828 --- [extShutdownHook] com.alibaba.druid.pool.DruidDataSource   : {dataSource-1} closing ...
2024-01-10 22:25:23.403  INFO 12828 --- [extShutdownHook] com.alibaba.druid.pool.DruidDataSource   : {dataSource-1} closed

进程已结束,退出代码为 0

  • 26
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

敲代码的翠花

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值