- 设计资产表:关键资产的详细信息
- 原子性、没有函数依赖、传递依赖
- 适度冗余来加快搜索,减少关联查询
- 设计过程表:记录过程的关键新建
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
在MySQL文档中,隔离级别是个谈论比较少的话题。 文档只提供了简要的描述,主要关注锁这个主题,并没有讨论每个隔离级别的语义。 这不只是MySQL文档的问题,SQL标准本身也是。 文档的缺失、SQL标准深入讨论的缺失,使得DBA和developers对隔离级别这个话题很陌生。在这篇博客中,我主要介绍MySQL的默认隔离级别是怎样工作的,并给出一些两人惊奇的例子。 首先来看下在标准中,隔离级别是怎么描述的:“The transaction isolation level of a SQL-transaction defines the degree to which the operations on SQL-data, or schemas in that SQL-transaction are affected by the effects of and can affect operations on SQL-data or schemas in concurrent SQL-transactions”。 简单来说,就是隔离级别定义了并发事务在修改数据时,是如何相互影响的。 MySQL使用可重复读作为默认隔离级别。在标准中,这个级别禁止脏读(non-committed data)和不可重复读(执行相同的查询,应该返回相同的结果),允许幻读(新增行可见)。但是MySQL使用一个不同的方式实现。下面看几个具体的例子。
创建两个连接,并分别叫Session Blue (sb)和 Session Res(sr),创建对应的db和表repeatable_read。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export GOPROXY=http://10.75.203.36:9090 | |
export GOBIN=$(CURDIR)/bin | |
FLAGS := -gcflags=all="-N -l" | |
GO := go | |
GOVET := go vet -all | |
GOLINT := golint | |
GOLEX := golex | |
GOBUILD := go build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
戚小存 2012-06-06 14:27:31 | |
(谈不上非常原创,算是八卦的长总结吧。借鉴天涯贴《新布局史话——棋盘上属于天才的时代》、吴清源自传、桥本宇太郎自传、田壮壮电影《吴清源》的相关访谈、各位棋手的相关访谈以及川端康成的一些围棋相关作品。) | |
玩掉欧冠的晚上,我看完球开始看吴清源的自传《中的精神》。 | |
他的文笔很平,情感也很收敛。但是我向来不喜欢男人在码字上面玩太多花,码字也就跟下棋一样,你执着于某些精彩的段子,就无法搞出大格局。 | |
看他讲六合之棋,讲什么是中,什么是最善一手。触动极大,突然对整个围棋史好奇起来。 | |
我爹一直是个非常不入流的围棋爱好者,生平最好的战绩是街道围棋比赛季军,参赛人数为:五人。 | |
据我看,他棋品也一般,下棋的时候咋咋呼呼高声喧哗跟菜市场一样,更别说经常拿这个作为躲避洗碗的借口。 | |
“别慌,等我打完谱。” |