上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 40 下一页
摘要: 1. 在trino执行SQL报错,如下图 2. 直接查看值没有什么异常 3. 通过将值复制到vim中,发现是特殊字符<200b>导致,为零宽度空格 4. 查看资料,发现有多种处理方式,但均不支持trino -- replace(所在字段,'\u200b','') -- 使用trim()方法可以去除掉 阅读全文
posted @ 2023-11-24 14:51 chenzechao 阅读(381) 评论(0) 推荐(0)
摘要: -- 此字符只影响终端的查询,如crt,xshell等,在navicat中不受影响 select str ,replace(str,char(13),' ') as str_fix from ( select concat('1',char(13),'2') as str ) t1 ; 阅读全文
posted @ 2023-11-17 15:56 chenzechao 阅读(93) 评论(0) 推荐(0)
摘要: 1. 开启JDBC rewriteBatchedStatements=true 2. 准备数据 PreparedStatement preparedStatement = connection.prepareStatement(InsertSql); 3. 插入数据并添加到批次 preparedSt 阅读全文
posted @ 2023-11-14 18:48 chenzechao 阅读(211) 评论(0) 推荐(0)
摘要: ```sql -- mysql 高性能count表 SELECT SQL_CALC_FOUND_ROWS 1 FROM table_name limit 1; SELECT found_rows() AS rowcount; select count(1) as cnt from table_nam 阅读全文
posted @ 2023-08-11 08:49 chenzechao 阅读(46) 评论(0) 推荐(0)
摘要: ![image](https://img2023.cnblogs.com/blog/986761/202307/986761-20230728182847795-1696970055.png) show variables like '%log_bin%'; mysqlbinlog -v --bas 阅读全文
posted @ 2023-07-28 18:29 chenzechao 阅读(33) 评论(0) 推荐(0)
摘要: ```sh # 分组排序 awk '{print substr($1,1,16),$2}'| awk '{ group[$1][$2] = 1; } END{ for (key1 in group){ count=0; for (key2 in group[key1]){ count++ } pri 阅读全文
posted @ 2023-07-26 14:24 chenzechao 阅读(24) 评论(0) 推荐(0)
摘要: ```sql -- 查看多个参数 SHOW VARIABLES where Variable_name in('max_connections','version','slow_query_log','log_output'); -- 查看多个状态 show global status where 阅读全文
posted @ 2023-07-26 14:07 chenzechao 阅读(21) 评论(0) 推荐(0)
摘要: ```sql -- trino(368版本)拼接嵌套JSON select t2.id ,CAST(CAST(ROW(t2.coordinates, 'geometry') AS ROW("type" JSON, "Feature" VARCHAR)) AS JSON) as geojson fro 阅读全文
posted @ 2023-07-19 17:50 chenzechao 阅读(138) 评论(0) 推荐(0)
摘要: ## 1. 搭建测试环境安装 ### 1.1 下载并启动docker-compose容器 ```bash # 该 Docker Compose 中包含的容器有: # DataGen:数据生成器。容器启动后会自动开始生成用户行为数据,并发送到 Kafka 集群中。默认每秒生成 1000 条数据,持续生 阅读全文
posted @ 2023-07-14 09:58 chenzechao 阅读(287) 评论(0) 推荐(0)
摘要: ### docker部署mysql client ```shell docker pull mysql:8.0.31 cat >> ~/.bashrc <<'EOF' ## --rm 表示容器退出及销毁 alias mysql-cli="docker run -it --rm mysql:8.0.3 阅读全文
posted @ 2023-06-28 16:11 chenzechao 阅读(180) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 40 下一页