lightfish

Results 265 comments of lightfish

io.mycat.router.mycat1xfunction.PartitionByPrefixPattern是先求和再取模的 采取的是将列种获取前 prefixLength 位列所有 ASCII 码的和进行求模 按你的需求换个分片算法

用自动hash型,支持两个字段hash,刚发布了新版本,可以看看 http://dl.mycat.org.cn/2.0/1.22-release/mycat2-1.22-release-jar-with-dependencies-2022-5-9.jar

`qq: 294712221` 联系或者在这里讨论也可以

``` CREATE TABLE db1.test ( `id` BIGINT(22) NOT NULL AUTO_INCREMENT, `sql` LONGTEXT, `fix_plan_id` BIGINT(22) DEFAULT NULL, KEY `id` (`id`) ) ENGINE = INNODB CHARSET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci DBPARTITION...

``` public void test672() throws Exception { try (Connection mySQLConnection = getMySQLConnection(DB_MYCAT)) { execute(mySQLConnection, "CREATE TABLE db1.test (\n" + "\t`id` BIGINT(22) NOT NULL AUTO_INCREMENT,\n" + "\t`sql` LONGTEXT,\n" + "\t`fix_plan_id` BIGINT(22)...

使用分片键 = 1; 比如id = 1

不使用分片字段就要全表扫描,暂时没有指定节点的注解

![image](https://user-images.githubusercontent.com/11361391/164454501-82aafb21-0b4e-4572-8eed-77b5ef810064.png) Mycat2的prometheus监控启动后是这样的,然后prometheus服务器会定时轮训这个http接口记录数据 你这个跨域问题在mycat里没有相关属性设置的,或者你用nginx,haproxy等工具,它对应的请求转发到mycat的端口