摘要: 17-时间戳顺序并发控制 并发控制介绍了两种思路: 二阶段锁 悲观方法:在问题出现之前, 采取措施阻止问题的发生 缺点 锁会影响性能,锁意味着等待, Time stamp Ordering(T/0) 时间戳顺序并发控制 :根据时间戳确定顺序,决定出问题如何处理 如果事务\(TS(T_i)\)发生时间 阅读全文
posted @ 2024-08-01 07:37 金字塔下的蜗牛 阅读(209) 评论(0) 推荐(0)
摘要: 16-二阶段锁 智能即压缩:用少数的规律来汇总足够多的数据。这种少数的规律以函数的形式体现。用一个函数来表示这些规律。只要函数足够复杂,其可解释性必要要变弱。从数据中提取规律是一个信息压缩的过程。 本节基于事务的理论,如何实现事务。二阶段锁是第一种实现的方案。 如下是一个 写读的冲突。 前面讲的理论 阅读全文
posted @ 2024-07-30 23:13 金字塔下的蜗牛 阅读(144) 评论(0) 推荐(0)
摘要: 并发控制横跨了多个层级: operator Execution 操作执行 Access Methods 读表 buffer Pool Manager 缓存池 日志恢复 buffer Pool Manager 缓存池 Disk 磁盘管理 Motivation: 当多人修改数据库同一条数据,就会出现竞争 阅读全文
posted @ 2024-07-29 22:56 金字塔下的蜗牛 阅读(45) 评论(0) 推荐(0)
摘要: 题目描述 链接:https://leetcode.com/problems/maximum-length-of-repeated-subarray/description/ Given two integer arrays nums1 and nums2, return the maximum le 阅读全文
posted @ 2024-06-03 21:17 金字塔下的蜗牛 阅读(22) 评论(0) 推荐(0)
摘要: 问题描述 Given a string s and a dictionary of strings wordDict, return true if s can be segmented into a space-separated sequence of one or more dictionar 阅读全文
posted @ 2024-05-23 22:15 金字塔下的蜗牛 阅读(21) 评论(0) 推荐(0)
摘要: 问题描述 链接:https://leetcode.com/problems/unique-binary-search-trees/description/ Given an integer n, return the number of structurally unique BST's (bina 阅读全文
posted @ 2024-05-22 22:47 金字塔下的蜗牛 阅读(83) 评论(0) 推荐(0)
摘要: 问题描述 链接: https://leetcode.com/problems/longest-increasing-subsequence/description/ Given an integer array nums, return the length of the longest stric 阅读全文
posted @ 2024-05-21 22:42 金字塔下的蜗牛 阅读(20) 评论(0) 推荐(0)
摘要: 问题描述 链接: https://leetcode.com/problems/longest-palindromic-substring/description/ Given a string s, return the longest palindromic substring in s 解释: 阅读全文
posted @ 2024-05-20 22:23 金字塔下的蜗牛 阅读(27) 评论(0) 推荐(0)
摘要: 问题描述 Given an integer array nums, find a subarray .that has the largest product, and return the product. The test cases are generated so that the answ 阅读全文
posted @ 2024-05-19 22:14 金字塔下的蜗牛 阅读(31) 评论(0) 推荐(0)
摘要: 问题描述 链接:https://leetcode.com/problems/coin-change-ii/ You are given an integer array coins representing coins of different denominations and an intege 阅读全文
posted @ 2024-05-18 20:55 金字塔下的蜗牛 阅读(28) 评论(0) 推荐(0)