摘要: 相关参数说明 innodb_large_prefix Command-Line Format --innodb-large-prefix=ON Deprecated Yes System Variable innodb_large_prefix Scope Global Dynamic Yes Ty 阅读全文
posted @ 2025-06-03 00:28 kahnyao 阅读(189) 评论(0) 推荐(0)
摘要: 支持的匹配模式(常用) 定位符 符号 描述 ^ 匹配输入字符串的开始位置。如果设置了 RegExp 对象的 Multiline 属性,^ 也匹配 '\n' 或 '\r' 之后的位置。 $ 匹配输入字符串的结束位置。如果设置了RegExp 对象的 Multiline 属性,$ 也匹配 '\n' 或 ' 阅读全文
posted @ 2025-05-30 01:34 kahnyao 阅读(356) 评论(0) 推荐(0)
摘要: 查询自定义对象ddl时间 select pc.relname, case object_type when 'r' then '普通表' when 'i' then '索引' when 's' then '序列' when 'v' then '视图' when 'p' then '存储过程和函数' 阅读全文
posted @ 2025-05-29 23:18 kahnyao 阅读(66) 评论(0) 推荐(0)
摘要: unix_timestamp MySQL 中的 unix_timestamp() 函数返回自 1970 年 1 月 1 日 UTC 时间以来的秒数。在 PostgreSQL 中,可以通过 EXTRACT 和 EPOCH 来获取这一信息。 CREATE OR REPLACE FUNCTION unix 阅读全文
posted @ 2025-05-28 22:52 kahnyao 阅读(117) 评论(0) 推荐(0)
摘要: 创建表结构 drop table if exists history; drop table if exists history_str; drop table if exists history_log; drop table if exists history_text; drop table 阅读全文
posted @ 2025-05-28 21:28 kahnyao 阅读(24) 评论(0) 推荐(0)
摘要: 创建表结构 drop table if exists history; drop table if exists history_str; drop table if exists history_log; drop table if exists history_text; drop table 阅读全文
posted @ 2025-05-28 21:27 kahnyao 阅读(21) 评论(0) 推荐(0)
摘要: MongoDB生成测试数据 使用的函数 函数 说明 Math.random() 返回0~1之间的随机数 Math.floor() 向上取整 new Date() UTC时间(0时区) 示例 字段 类型 说明 Math.floor(Math.random() * 100) 数值 100内的随机整数 f 阅读全文
posted @ 2025-05-17 10:11 kahnyao 阅读(55) 评论(0) 推荐(0)
摘要: 方法1 -- 创建表 create table TestTable as select rownum as id, to_char(sysdate + rownum/24/3600, 'yyyy-mm-dd hh24:mi:ss') as inc_datetime, trunc(dbms_rando 阅读全文
posted @ 2025-05-17 10:10 kahnyao 阅读(96) 评论(0) 推荐(0)
摘要: 构造测试数据 相关函数 函数 说明 rand() 随机函数,会生成0~1之间的随机数 md5(input) 散列函数,根据输入值的不同,生成不同的32位字符串(但只有09,af共16种字符) substring(string, position, length) 字符串截取函数,会截取字符串stri 阅读全文
posted @ 2025-05-17 10:09 kahnyao 阅读(47) 评论(0) 推荐(0)
摘要: 生成测试数据 用到的函数 基本函数 函数 说明 string_agg() 是 聚合函数,用于将一列字符串连接成一个字符串 substring() 用于从一个字符串中提取子串,substring(string, start, length)其中,string: 要从中提取子串的原始字符串。start: 阅读全文
posted @ 2025-05-17 10:08 kahnyao 阅读(60) 评论(0) 推荐(0)