随笔分类 -  mysql

上一页 1 2 3 4 5 6 7 ··· 14 下一页
摘要:小结: 1、Buffer Pool,控制块,缓存页,数据页,Free 链表,Flush 链表,LRU 链表,Page, Change Buffer, Log Buffer MySQL - InnoDB 内存结构解析 https://mp.weixin.qq.com/s/U_KVZNGlTUvT3_E 阅读全文
posted @ 2022-09-19 20:44 papering 阅读(147) 评论(0) 推荐(0)
摘要:mysql用int做时间戳存储,最大2147483647, 大限2038年_生活有味道的博客-CSDN博客_mysql存时间戳 https://blog.csdn.net/fzlw000/article/details/124144603 阅读全文
posted @ 2022-08-23 10:10 papering 阅读(347) 评论(0) 推荐(0)
摘要:MySQL :: MySQL 8.0 Reference Manual :: 12.20.1 Aggregate Function Descriptions https://dev.mysql.com/doc/refman/8.0/en/aggregate-functions.html#functi 阅读全文
posted @ 2022-07-28 07:36 papering 阅读(138) 评论(0) 推荐(0)
摘要:MySQL :: MySQL 8.0 Reference Manual :: 10.8.6 Examples of the Effect of Collation https://dev.mysql.com/doc/refman/8.0/en/charset-collation-effect.htm 阅读全文
posted @ 2022-03-31 16:28 papering 阅读(51) 评论(0) 推荐(0)
摘要:实践: 1、 CREATE TABLE `t0` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `left_col` INT(11) NOT NULL DEFAULT '0', `right_col` INT(11) NOT NULL DEFAULT '0', `n 阅读全文
posted @ 2022-02-18 18:34 papering 阅读(89) 评论(0) 推荐(0)
摘要:小结: 1、 Limit深分页问题的本质原因就是:偏移量(offset)越大,mysql就会扫描越多的行,然后再抛弃掉,这样就导致查询性能的下降。所以我们可以采用标签记录法 千万级数据深分页查询SQL性能优化实践 原创 交易研发 曹志飞 京东零售技术 2023-09-13 19:00 发表于北京 一 阅读全文
posted @ 2022-02-17 20:25 papering 阅读(1423) 评论(0) 推荐(0)
摘要:select * order group by 阅读全文
posted @ 2022-02-10 20:15 papering 阅读(32) 评论(0) 推荐(0)
摘要:小结: 1、 场景:代码中表名区分大小写,数据库没有区分 检查 SHOW VARIABLES LIKE "%lower_case_table_names%"; 如果为0:; 修改my.cnf设置lower_case_table_names为1; 重启mysql。 0数据库区分大小写,要求代码中按大小 阅读全文
posted @ 2022-01-28 22:30 papering 阅读(132) 评论(0) 推荐(0)
摘要:小结: 1)mysql查询优化 做搜索查询量大的表一般都以空间来换取时间,设计成静态表 MySQL :: MySQL 8.0 Reference Manual :: 15.10 InnoDB Row Formats https://dev.mysql.com/doc/refman/8.0/en/in 阅读全文
posted @ 2022-01-27 09:12 papering 阅读(158) 评论(0) 推荐(0)
摘要:ALTER TABLE `test`ADD COLUMN `avatarbase64tmpsave` mediumblob NULL COMMENT '待优化方案:头像的base64编码;后端透明存储';SET GLOBAL max_allowed_packet=67108864;SHOW GLOB 阅读全文
posted @ 2021-12-23 23:24 papering 阅读(278) 评论(0) 推荐(0)
摘要:小结: 1、 不同锁差异:锁到底加在了什么对象 要么加在了表上 要么加在了行上 原创|InnoDB事务锁系统及其实现 https://mp.weixin.qq.com/s/W07ZIW0GRtsrS5nuiy2z_A 原创|InnoDB事务锁系统及其实现 原创 腾讯数据库技术 腾讯数据库技术 202 阅读全文
posted @ 2021-11-17 09:06 papering 阅读(470) 评论(0) 推荐(0)
摘要:MySQL :: MySQL Internals Manual :: 14 MySQL Client/Server Protocol https://dev.mysql.com/doc/internals/en/client-server-protocol.html 阅读全文
posted @ 2021-11-16 17:46 papering 阅读(128) 评论(0) 推荐(0)
摘要:24.1 Sleep In some cases race conditions can be repeated when all but one thread are blocked (for example waiting for an SQL lock). Then the remaining 阅读全文
posted @ 2021-10-28 13:13 papering 阅读(65) 评论(0) 推荐(0)
摘要:MySQL :: MySQL 8.0 Reference Manual :: 12.24 Miscellaneous Functions https://dev.mysql.com/doc/refman/8.0/en/miscellaneous-functions.html#function_ine 阅读全文
posted @ 2021-10-13 15:59 papering 阅读(165) 评论(0) 推荐(0)
摘要:小结: 1、 //查询mysql当前的所有进程 SHOW PROCESSLIST; //查询出执行时间超过10s未提交的事务 SELECT t.trx_mysql_thread_id ,t.trx_state ,t.trx_tables_in_use ,t.trx_tables_locked ,t. 阅读全文
posted @ 2021-09-16 17:28 papering 阅读(719) 评论(0) 推荐(0)
摘要:mysql中find_in_set()函数的使用 - 平凡希 - 博客园 https://www.cnblogs.com/xiaoxi/p/5889486.html 阅读全文
posted @ 2021-09-16 14:12 papering 阅读(58) 评论(0) 推荐(0)
摘要:// insert_inUpsSQL = "INSERT INTO %s (mid,nickname,account_type,category_id,fans,account_state,sign_type,apply_at,%s,is_deleted) VALUES (?,?,?,?,?,?,? 阅读全文
posted @ 2021-06-09 20:57 papering 阅读(140) 评论(0) 推荐(0)
摘要:mysql 枚举值 注意这里 枚举值,从1开始编号,=1,即取第一个枚举值;=1,='1' 区别 翻译 搜索 复制 阅读全文
posted @ 2021-06-05 16:20 papering 阅读(130) 评论(0) 推荐(0)
摘要:实践: 1、 开启事务1,不提交,事务2,无法查询; 应用:分布式锁。 SHOW VARIABLES LIKE "%transaction%"; transaction_isolation REPEATABLE-READ Locking reads are only possible when au 阅读全文
posted @ 2021-06-05 16:14 papering 阅读(204) 评论(0) 推荐(0)
摘要:DELETE FROM tmp_debug WHERE Id NOT IN (SELECT Id FROM tmp_debug ORDER BY Id DESC LIMIT 2)-- DELETE FROM tmp_debug WHERE Id NOT IN (SELECT * FROM ((SEL 阅读全文
posted @ 2021-06-02 13:52 papering 阅读(132) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 ··· 14 下一页