上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 24 下一页
摘要: 【pg不支持读未提交】 [session1] BEGIN;INSERT INTO my_table(id,value) VALUES (1,'something'); [session2] BEGIN TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; SEL 阅读全文
posted @ 2022-02-12 22:32 stupidstan2019 阅读(134) 评论(0) 推荐(0)
摘要: 1)创建文件调用栈 2)初次写文件内容 2.1)写叶子节点0页 调用栈 a)根据heapBlk=0,计算出0页的位置 addr.level = FSM_BOTTOM_LEVEL; addr.logpageno = heapblk / SlotsPerFSMPage; #0 *slot = heapb 阅读全文
posted @ 2022-02-12 15:35 stupidstan2019 阅读(101) 评论(0) 推荐(0)
摘要: 【背景】 索引扫描:先获取第一个tuple位置,然后访问tuple,再获取第二个位置,访问第二个,可能导致访问tuple随机io 图片转自https://www.shangmayuan.com/a/1facf2c3b7ba4bc99f5e00e2.html 优化办法:通过位图将地址收集起来,再顺序读 阅读全文
posted @ 2022-02-09 22:35 stupidstan2019 阅读(80) 评论(0) 推荐(0)
摘要: 【参考】 https://www.cybertec-postgresql.com/en/postgresql-indexing-index-scan-vs-bitmap-scan-vs-sequential-scan-basics/ 【测试方法】 CREATE TABLE sampletable ( 阅读全文
posted @ 2022-02-09 20:32 stupidstan2019 阅读(34) 评论(0) 推荐(0)
摘要: 0)插入两行数据 INSERT INTO usersSimple (user_id, fname) VALUES (1745, 'john'); INSERT INTO usersSimple (user_id, fname) VALUES (1744, 'smith'); 1)数据存储 在这个bu 阅读全文
posted @ 2022-01-23 08:57 stupidstan2019 阅读(41) 评论(0) 推荐(0)
摘要: 【问题描述】 直接设置会遇到超时,tcpdump抓包传输有1GB 【问题定位】 看mysqld是1GB,把clion的符号表设置下,应该就不用传输物理文件 【调试效果】 阅读全文
posted @ 2022-01-15 23:16 stupidstan2019 阅读(84) 评论(0) 推荐(0)
摘要: 【测试】 insert into t1(id) values(1); 插入前后binlog文件大小从698变为938,涨240 对应这4条 show binlog events in "binlog.000017"; 【调用栈】 阅读全文
posted @ 2022-01-15 22:48 stupidstan2019 阅读(35) 评论(0) 推荐(0)
摘要: 【查看binlog】 show variables like '%log_bin%'; + + + | Variable_name | Value | + + + | log_bin | ON | | log_bin_basename | /data/mysql/binlog | | log_bin 阅读全文
posted @ 2022-01-15 21:57 stupidstan2019 阅读(212) 评论(0) 推荐(0)
摘要: 【测试】 select pg_advisory_lock(23); 【调用栈】 主要逻辑 内部的结构先放着,主要是判断granted全部为0 测试模型,granted[7]=1,#ExclusiveLock=7 【大概结构参考cmu资料】 https://www.cnblogs.com/gatsby 阅读全文
posted @ 2022-01-08 21:05 stupidstan2019 阅读(43) 评论(0) 推荐(0)
摘要: 【测试步骤】 session1 begin; select * from t1 for update; session2 update t1 set id=2 ; 【流程】 1)session1, 给tuple设置Xmax 2)session2,检测tuple状态 result = HeapTupl 阅读全文
posted @ 2022-01-08 15:29 stupidstan2019 阅读(107) 评论(0) 推荐(0)
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 24 下一页