Tip: 看不到本站引用 Flickr 的图片? 下载 Firefox Access Flickr 插件 | AD: 订阅 DBA notes -- ![]()
2008-08-22 Fri
We’ve discussed today how we should implement MySQL Version advisory in mk-audit tool. One obvious questions was to look at the end of life - it is often bad idea to run MySQL versions past end of life as even security bugs may not be fixed in these (though do not get paranoid, if you’re running MySQL in isolated environment the risk may be low).
So how does EOL schedule looks ?
MySQL defines Active Lifecycle and Extended Lifecycle for release where first one is 2 years since initial GA release and second is further 3 years of life in “critical bug fixes only” mode with releases available for premium (Silver+) Support offerings.
For MySQL Community users this means only releases within Active Life Cycle will be made. For example MySQL 4.1 had end of its Active Lifecycle in the end of 2006. and indeed Latest MySQL 4.1 available for the public is 4.1.22 while as Manual Says there were number of further releases with last one in March 2008 containing fixes for security and critical bugs.
It is also worth to note even though MySQL 5.0 successor (MySQL 5.1) is still not released as GA, MySQL 5.0 Active LifeCycle will end in end of 2008, unless there are changes means. If same policies as of MySQL 4.1 are followed we’ll soon see stop in MySQL community releases of MySQL 5.0 most likely before MySQL 5.1 will proven MySQL 5.0 replacement.
There is no blame on MySQL - it is no fun to support these old versions both for Support team (remembering these all old versions limitations) and for development team, and it costs, so somebody has to pay for this and this is exactly what premium MySQL Support levels are for.
My main point is - make sure you understand MySQL Release Policy and so what to expect whenever you’re MySQL customer or community user.
Shameless Plug: I guess hundreds of Percona customers are reading this blog so I should say how Percona treats old versions. We obviously recommend to upgrade when it makes sense while at the same time we have no restrictions in terms of supported versions. If customer chooses to run older version he may have more problems and these may take more time to deal with, so the bill would be higher. We are also happy to provide builds based on updated trees and backport fixes from the newer releases if MySQL has chosen not to backport bug because of its severity. We believe in freedom of choice.
Entry posted by peter | No comment
After my previous post there were questions raised about Index Merge on Multiple Indexes vs Two Column Index efficiency. I mentioned in most cases when query can use both of the ways using multiple column index would be faster but I also went ahead to do some benchmarks today.
I'm using couple of simple tables:
-
CREATE TABLE `t1000idxmerge` (
-
`i` int(11) NOT NULL,
-
`j` int(11) NOT NULL,
-
`val` char(10) NOT NULL,
-
KEY `i` (`i`),
-
KEY `j` (`j`)
-
) ENGINE=MyISAM DEFAULT CHARSET=latin1
-
-
CREATE TABLE `t1000idx2` (
-
`i` int(11) NOT NULL,
-
`j` int(11) NOT NULL,
-
`val` char(10) NOT NULL,
-
KEY `i` (`i`,`j`)
-
) ENGINE=MyISAM DEFAULT CHARSET=latin1
I have populated this table with random data for i and j having both of them having 1000 of distinct values, independent on each other. I also created couple of other tables with same data just with really low cardinality with i and j having just 3 values each. The table contained about 18M rows though was small enough to fit in the systems memory.
I've benchmarked simple queries using where clause which covers multiple columns:
-
Q1 SELECT sum(length(val)) FROM T WHERE i=2 AND j=1
-
Q2 SELECT sum(length(val)) FROM T WHERE i=2 AND j BETWEEN 1 AND 2
-
Q3 SELECT sum(length(val)) FROM T WHERE j=2 AND i BETWEEN 1 AND 2
-
Q4 SELECT sum(length(val)) FROM T WHERE i=2 OR j=1
-
Q5 SELECT sum(length(val)) FROM T WHERE j=2 AND i BETWEEN 100 AND 200
As some of them there way too fast if run once I ran them multiple times and measured time appropriately. To remove the overhead of starting MySQL etc from equation I also measured execution of "SELECT 1" query using same script and subtracted this time from result in the table.
time for ((i=0;i<100;i+=1)); do mysql test -e "SELECT sum(length(val)) FROM t1000idxmerge WHERE i=2 AND j=1"; done > /dev/null
In the result table I compute per query results and present results in milliseconds.
| Query | 1000 - 2 indexes | 1000 - 2 columns | 3 - 2 indexes | 3 - 2 columns |
| Q1 | 20 | 0.2 | 6940 | 2530 |
| Q2 | 25 | 0.3 | 7400 | 7500 |
| Q3 | 25 | 0.3 | 7200 | 3830 |
| Q4 | 70 | 3800 | 4700 | 4700 |
| Q5 | 25 | 2980 | - | - |
Note1: Q1 will not use Index Merge technique for low cardinality table but instead pick to do single index scan. I'm not aware of the optimizer hint which would allow to force index merge as you can do with index accesses in general.
Note2 Q2/Q3 can't use Index Merge however as it is currently implemented so they would use single index range scan. The 2 indexes however benefits to Q3 because it can only use first keypart of index (j,i) to resolve BETWEEN part of the clause which may not be very selective.
Note3 You may be surprised why 2 column index is faster for Q3 in case of low cardinality even though MySQL can't use index well. You're right MySQL can't and MySQL does not - Full table scan is performed and in this case turns to be faster than scanning 1/5th of the table using index. Also Full Table Scan is preferred for Q4 in all cases but in case of high cardinality multiple index configuration.
Note4 Q5 was just run on high cardinality tables to show what difference large BETWEEN can make.
Conclusion: For benchmarked queries we can see Multiple Column index beats Index Merge in all cases when such index can be used. It is also worth to watchout a MySQL may decide not to do Index merge (either intersection or union) but instead do full table scan or access table picking only one index on the pair.
Entry posted by peter | No comment
It’s the end of the week, and here’s a few stories that caught our attention:
- Google wants to free the airwaves. The FCC is about to decide what to do with all the leftover radio white space, and this petition/drive could influence the decision. Check it out.
- And speaking of radio, it looks like some of the predicted results of the copyright fees levied on internet radio stations are about to come to pass. Wired is reporting that Pandora is near-failing, with almost 70% of their profits going to pay the fees. Sad news.
- We would be remiss without at least one Olympics-related item. So, here’s your obligitory gold-medal geek moment: the Wall Street Journal investigates how the DiveCam follows the athletes from platform take-off to splash-down. How does it work? The simple answer… is gravity. Mmmmm, physics.
- Last week brought news of a a legal win for open source licenses. See what the Red Hat legal team had to say about the ruling as well.
Crisis has struck! This week’s Log Buffer editor had to beg off at the eleventh hour when his time vanished. It happens. But, in every crisis, an opportunity (well . . . maybe, maybe not). The opportunity — an open discussion of this week’s best database blog articles. Readers in control.
Log Buffer is always looking for editors, so if you’d like to step forward and publish one on your own blog, read the Log Buffer guidelines and send me an email.
I’m going to go through my bookmarks and add my own presently. I hope to hear from you!
作者:d.c.b.a, 订阅AnySQL, Oracle数据库恢复及服务, Sybase恢复, 磁盘及RAID恢复
一提到系统监控就会联想到Cacti这个优秀的开源软件, 或用Nagios. 不管什么样的监控软件平台, 监控可做的事大约有四个方面.
一定的报警机制. 对于特定的事件, 需要用特定的方式(手机, 邮件, 淘宝旺旺等)通知相关人员, 通知的事件大小由监制的机制来决定, 如果是7x24的, 那一般只有交易量下降多少比例时才会报警, 如果不是7x24的, 那么有任何错误发生时都需要报警.
一定的图表显示. 图表是最好的表现数据趋势的方式, 对于交易量或主机负荷之类的少数重要数据, 用图的方式显示. 缺点是一个屏幕内能提供的信息量比较少, 对于详细诊断问题所在起不了多少帮助.
很多的详细信息. 用网页方式显示某些方面详细的数据, 如将所有的消息滞留的情况记录下来, 用来查找发生的问题. 更多的如应用中关键的API调用次数, 显示一个当前值和历史平均值, 也可以确定某个点是不是有问题. 非常适合于详细问题的快速确定.
一定的自动响应机制. 管理出身的会很关注这一点, 是很好的设想, 但不容易实现, 最简单地说表空问不足这个问题吧, 让程序自动加文件? 还是做一个空间预测, 提前加好空间, 个人偏向于后者.
现在监时做的一些监控就是建立在自已开发的WebChart基础上的, 表格和图形并存的方式. 更适合于白天工作时段的监控, 好好保存一定历史信息, 还可用于事后问题查找.
相关文章 | Related Artiles
我要留言(当前0)
我觉得马云看得很清楚,现在进入网游运营,大成功的机会已经很小了。不过,网游是一个成功的生意,围绕网游做一些支付宝的合作,甚至更多种类的一些服务都是可以的。
“ 中国雅虎强调,目前重点仍是生活服务的电子商务领域”。雅虎口碑要匹配实现的是未来五年巨大的第三产业和服务业的增长。雅虎口碑认为,租房子、吃饭、洗脚 店、理发、找保姆、找学校等等,是未来五年后中国互联网最大的业务之源。雅虎口碑的模式,在美国称为Local search,马云称之为生活服务类的平台。
这也就是为什么会有雅虎口碑的合并的根本原因。仅有口碑是不够的,需要由中国雅虎的支持。也就是说单独的分类信息网站是不够的。
说到分类信息网站,中国的分类信息网站学习的对象是:1995年创办于旧金山的Craigslist,创始人Craig Newmark。但他并不认可分类信息的说法,他说:“我不明白你们研究的商业模式是什么,我们是一个社区网站。”
我觉得他的说法是很核心的一个问题。
其实在搜索引擎当道的今天,信息的汇总、或者说搜集信息不是一个困难的事情。关键要看信息后面绑定的人群。
信息后面绑定的是中小企业,那是阿里巴巴;绑定的是小商户,那是淘宝。绑定的真正的消费者、爱好者,那就是健康的,是雅虎口碑想要的。最不合适的是绑定一大堆二手中介,那是目前分类网站都不想要的,因为他们影响用户的最终体验。
SNS的发展,特别是进入实名之后的SNS发展,为第三产业服务的网络化进程,提供了良好的基础。
我的观点依旧是融合。SNS网站现在聚集了真实的人,并且会越来越多;生活服务网站聚集了有效的服务。他们的发展会互相渗透,趋向融合,之后,竞争胜利者得以生存,并发展至趋向垄断。
这就是我们看到的,生活服务类网站,在分类信息的基础上,纷纷开始加大社区建设的投入的原因。而SNS网站,一条路走向WEBGAME,一条路走向生活服务。
下午陪动力维护的兄弟去踩点,准备下周的电源割接,要影响几台服务器。回来后也没什么事情,业务那里几张单子做掉,一时又有兴趣来改一下以前的小程序。
主要起因是昨天偶然看到whatsup的syslog,打开很慢,而且搜索起来也不是很方便,于是想,写到数据库里就好多了。
于是在以前的程序上增加了写数据库的功能,把菜单什么的改成中文的,简单的INI文件配置数据库连接,ADO连接,可以自定义插表语句,以适应不同的表结构。
...
Shared by Fenng
老外的评价

Image from CNN
Two words: Fuck China.
Their “anything to get ahead” attitude is sickening. They’re exploiting the hell out of little kids by taking them from their families, putting the fear and pressure of a billion people on them, and putting makeup on them to try and pull off “16″.
It’s not working, guys. They’re fucking kids. 14 on a good day. The world is watching as you try and cheat your way to victory. We see what you are.

Image from ABC News
This same cheating mentality is driving the insane amount of pollution in the country.

Image from Treehugger
But who cares? Who gives a hell if the country is poisoned and ruined, right? What’s a few thousand people with cancer? As long as they’re an economic superpower, right? Anything for the glory of country, right? Displace tens of thousands to build the stadium, hide the squalor that their people live in day after day, lock up people who dissent.
All to make money. All to become powerful.
I hope the IOC finds that the Chinese lied about the ages of the young gymnasts. I hope they get stripped of all their medals. I wish them extreme embarrassment.
It will, in some small part, repay their soulless exploitation of humans for the sake of nationalism.:
Shared by Fenng
雅克·罗格 先生被北京的热情同化了
摘 要:“这不是我们所期望的冠军”,罗格这么评价着这位牙买加短跑运动员 。“我对他的作秀没有任何意见。但是我认为他应该对他的对手表现的更尊重一些,比赛结束后马上向其他挥挥手,拍拍肩。而不是做出那样的手势,好像100米这个项目只属于他一个人一样。”
体坛通讯员殳海报道 这几天,体育界最具权威的人士——国际奥委会主席罗格先生一直拿一位来自小岛国的短跑运动员大做文章。
博尔特在两项最举世瞩目的比赛里的表现虽然精彩绝伦,但是另外一些细节却被罗格认为是:现代奥林匹克史上最不合时宜而最无趣的。
“这不是我们所期望的冠军”,罗格这么评价着这位牙买加短跑运动员 。“我对他的作秀没有任何意见。但是我认为他应该对他的对手表现的更尊重一些,比赛结束后马上向其他挥挥手,拍拍肩。而不是做出那样的手势,好像100米这个项目只属于他一个人一样。”
天啊,这可比那些关于行贿买通IOC官员的谈话要有力度多了。
包括美国在内的所有强国、大国们,在比赛中都有自主权。他们可以撅嘴、炫耀、使眼色、大发抱怨、不能兑现他们对祖国的承诺……他们可以做任何他们想做的事情。甚至会让人觉得他们完全可以轮流给罗格主席和他的同事们一巴掌都不打紧,反正有人会来帮他们买单,请罗主席吃晚餐、喝红酒。
博尔特仅仅是一个短跑运动员而已。即使你不喜欢他的举止,也没有必要去攻击他、并把这个问题放到全世界范围内去讨论吧?
“我能理解他的幽默,”罗格说,“但是他可以用另一种方式来表达,而他呢?肆无忌惮地跟所有人表示‘有本事你就来追我啊’。也许他不会这么做,但是他却记在了心里,他还是个年轻人啊。”
博尔特是在跟谁表态呢?那些多年来一直都有庞大资金支持的大国运动员们?他们是这么定义的吗?然后再把他大肆宣传一番?
其实博尔特的形象,和奥林匹克的定义无比贴切。他不是什么发达国家的产物,但是通过计划周密的训练,他是那么理所应当地得到了金牌。
博尔特就像一缕春风般吹进了这个当今体育界,这个有如天外来客的家伙用他疯狂的表现和鲜明的个性让整个世界惊喜。他已经不再是那种老式机器里制造出来的工业品了。
博尔特属于他自己,而全世界也因此爱上了他。
凭借着他内心强烈的获胜欲望,博尔特成为了本届奥运会上最闪耀的明星,以他的一己之力拯救了“后菲尔普斯”时代,这几天奥运会的票房——虽然他没有那么多机会去创造世界纪录,但是他所表现出来的能力和他带给人们的快乐,完全能和菲尔普斯相提并论。
他在跑道上的所有竞争对手都输得心服口服,没有人对博尔特提出任何质疑:因为他们也知道,只有博尔特这样天神般的表现才能把田径历史上写满禁药丑闻的那一页翻过去。“闪电”博尔特终于用自己创造的奇迹把人们的视线拉回到了田径赛场,而在两个星期前,恐怕人们连想都不敢想。
“我并没有觉得他表达了任何不敬的意思,”美国名将肖恩·克劳福德对美联社的记者说,“他完全可以在场上尽情起舞。”
所以,我们想要告诉罗格先生,如果您真的想要展示自己强硬的一面,也许不应该拿博尔特这样一位来自小国的运动员开刀,不管是批评谁、发表什么头条言论,都大可以放胆去谈。
也许博尔特是奥运会的一个大问题,因为他让世界都觉得尴尬。但至少,他身上有值得我们学习的东西。
是的,雅克·罗格先生,是的。
2008-08-21 Thu
2008-08-20 Wed
AnySQL.net
DBA notes
Oracle & Starcraft
eagle's home
Give you some color to see see!
AnySQL.net English
Oracle Scratchpad
Oracle Life
OracleDBA Blog---Please enjoy the pain which is unable to avoid!
Uploads from Fenng(dbanotes)
Chanel [K]
xzh2000的博客
Oracle Security Blog
ERN空间
Eddie Awad's Blog
MySQL Performance Blog
The Tom Kyte Blog
Delicious/Fenng/oracle
AIXpert
O'Reilly Databases
Red Hat Magazine
DBASupport
DB2 Magazine 中文版
developerWorks 中国 : 技术文章 , 教程 AIX
Pythian Group Blog » Log Buffer
车东[Blog^2]
blue_prince
玉面飞龙的BLOG
此生 今世
人生就是如此
Orange Tiger 木匠 的 移民生活
生活帮-LifeBang
Hey!! Sky!
dba on unix
Oracle Notes Wiki
Brotherxiao's Home
柔嘉维则@life.oracle.eng
Fenng's shared items in Google Reader
jametong's shared items in Google Reader
缥缈游侠-logzgh
Tanel Poder's blog: Core IT for geeks and pros
DBA Tools
ilonng
yangtingkun
Oracle & Unix
Inside the Oracle Optimizer - Removing the black magic
Ricky's Test Blog
DBA@Taobao
存储部落
Think in 88
Alibaba DBA Team
Oracle Team @SNC
淘宝数据仓库团队
OracleBlog.cn
中国雅虎_站长天下_www.dbaleading.com_原创文章



















