2007/05 19
每天早上要遇到的问题,Grub Error 18. 系统进入不了。
没有找到什么很好的办法,硬盘太大了,160G。荤菜。下次找机会升级BIOS。
现在临时的办法是用Ubuntu光盘进入系统Live模式, 然后重启之。Grub就可以正常启动了。不知缘由。

Posted by rollenc

Not modified
2007/05 15
意外的,pandora又能够访问了。不过现在在办公室,没耳机,加上,流量控制,暂时上不了。
晚上见。希望可以找到一度熟悉的声音和体验。
愿,好景常在!

==========
回家之后才发现,pandora还是打不开,而又老友在QQ上提醒我,我办公室的IP是美国的。我惊讶,也试探地访问了GreatWF中的几个关键字和维基百科,竟然一切正常,完全不受GreatWF控制。
纳闷了,不过很爽。
Defined tags for this entry:

Posted by rollenc

Last modified on 2007-06-21 13:07
2007/05 11
4月13号申请的Ubuntu光盘到了,速度挺快的。发帖庆祝!

信封正面
Ubuntu
信封的背面
Ubuntu
邮件中的全部内容(少掉一张,送人了)
Ubuntu
Defined tags for this entry:

Posted by rollenc

Last modified on 2007-05-12 02:14
2007/05 9
操作系统
|-- Ubuntu
|-- Windows

编辑器
|--Eclipse 这是我最爱的编辑器。完全集成php环境的发布包可以在EasyEclipse上找到。由于Eclipse优秀的可扩展性,基于Eclipse还使用到了
    |-- phpEclipse
    |-- subclipse
    |-- JSEclipse
|--Dreamweaver: 大概有一年多没有使用了,不过还是可以推荐一下。以及说明一个彩蛋,Dreamweaver的HTML代码缩进功能:保存混乱的html代码页面,用浏览器打开,全选,复制,然后在DreamWeaver的视图中粘贴。再看你的HTML代码视图。一切完好。不过在含有smarty代码的文件中可能会有些损失。

文本比较工具
|-- UltraCompare for Windows

浏览器
|-- Firefox 最爱的浏览器。和Eclipse一样,也是具有高度可扩展的。我常说,Firefox要是不装插件,那就是一坨。。。插件集包括:
     |--Firebug
    |--Google Toolbar
    |-- IE tab (for Windows)
    |-- Super DragAndGo
    |-- Web Developer
    |-- DownThemAll
    |-- clipmarks
|-- IE: 只在上银行网站会用一下。即便是用,也是在firefox中通过IE Tab使用。顺便强烈鄙视一下所有的不支持Firefox的银行网站。

PHP开发工具包
|-- simpleTest
|-- Smarty

JS开发工具包
|-- Prototype

JS 代码美化格式化工具
|-- JavaScript Code Improver

MySQL数据库UI
|-- SQLyog for Windows
|-- MySQL Query Browser for Linux

数据库设计软件
|-- MySQL Workbench

UML编辑器
|-- Poseidon for UML

播放器
|-- xmms for Linux
|-- 千千静听 for Windows

FTP工具
|-- FlashFXP for Windows
|-- Filezilla for Linux && Windows

远程登录工具
|-- PuTTY
|-- SecureCRT

IM
|-- Gaim Gtalk for Linux
|-- Gtalk for Windows
|-- 飘云TM for Windows 目前已经让QQ下岗了,基本不上了
|-- LumaQQ for Linux

字典
|-- StarDic for Linux
|-- 金山词霸 for Windows

输入法
|-- 搜狗拼音输入法 for Windows
|-- SCIM for Linux

线上应用
|-- 搜索 Google
|-- 主页 iGoogle
|-- 邮箱 Gmail
|-- 书签 Google bookmark
|-- RSS Google Reader
|-- 网站流量统计: Google Analytics
|-- Blog: s9y #1
|-- Wiki: MediaWiki #1
|-- CMS Drupal #1 #2
|-- Photo: Flickr && Pisaca
Defined tags for this entry: , ,

Posted by rollenc

Last modified on 2008-02-14 10:13
2007/05 9
经过一番折腾,终于把simpletest整合到了开发环境中。接下来,实验一下测试驱动开发。
很久以前就想学习这一些测试了,但是始终没有理解测试驱动的含义及其在XP中的含义。希望本次实验级可以获得对测试驱动的进一步认识。
Defined tags for this entry:

Posted by rollenc

Last modified on 2007-05-09 08:45
2007/05 7
今天访问pandora,出现了拒绝提示,大意是pandora只对美国用户开放。虽然很久以前就在pandora右下角看到了“ Pandora is currently for US listening only”,但不料,这一天终于来了。
郁闷,没地方听好歌了。
Defined tags for this entry:

Posted by rollenc

Last modified on 2007-05-07 23:55
2007/05 6
转载来源:海一角营销人网

1.明确的目标——P(Purpose)

高绩效的团队拥有明确的目标,主要有四点:
①团队成员能够描述,并且献身于这个目标。
②目标十分明确,具有挑战性,符合SMART原则。
③实现目标的策略非常明确。
④面对目标,个人角色十分明确,或团队目标已分解成个人目标。

2.赋能授权——E(Empowerment)

赋能授权指团队已从集权向分权的方向过渡,团队成员感觉个人拥有了某种能力,整个群体也拥有了某些能力。赋能授权体现在两个方面:

①团队在组织中地位提升,自我决定权也在提高,支配权很大。

②团队成员已经感觉到拥有了某些方面的支配权。

比如说麦当劳,过去员工没有权利给顾客超过两包以上的番茄酱,而要请示主管,而近些年来麦当劳已经改变这种方式,员工可以自己做主了。

赋能授权给员工的时候,同时需要注意:
将合理的规则、程序和限制同时交给他。
成员有渠道获得必要的技能和资源,能知道该怎样在指定的范围内做事。
在政策和做法上能够支持团队的目标。
成员互相尊重,并且愿意帮助别人。

3.关系和沟通—R(Relation and communication)

在关系和沟通方面,高绩效的团队表现出的特征是:
①成员肯公开而且诚实表达自己的想法,哪怕是负面的想法。
②成员会表示温情、了解与接受别人,相互间的关系更融洽。
③成员会积极主动地聆听别人的意见。
④不同的意见和观点会受到重视。

4.弹性——F(Flexible)

团队成员能够自我调节,满足变化的需求,这就表现出一种弹性和灵活性。团队成员需要执行不同的决策和功能,当某一个角色不在的时候要求有人主动去补位,分担团队领导的责任和发展的责任。

5.最佳的生产力——O(Optimal productivity)

团队有了很好的生产力,产出很高,产品品质也已经达到了卓越,团队决策的效果也会很好,显然具有了明确问题的解决程序。这样的团队做任何一件事情或处理任何危机都有科学的程序。

6.认可和赞美——R(Recognition)

当个人的贡献受到领导者和其他成员的认可和赞美时,团队成员会感觉到很骄傲;团队的成就涉及所有成员的认可,团队的成员觉得自己受到一种尊重,团队的贡献受到了组织的重视和认可。从个人到团队都受到一种认可,人们的士气就会提升。

7.士气——M(Morale)

每个人都乐于作为团队中的一员,都很有信心,而且士气高昂。如果团队成员对于自己的工作都引以为荣,而且很满足时,团队的向心力就会很强,士气高昂。
Defined tags for this entry:

Posted by rollenc

Last modified on 2007-05-06 08:56
2007/05 6
常常忘记后缀。比如apache.org, mysql.com, php.net,以及其他的一些怪异的网址。
将google的手气不错植入到firefox地址栏中,可以起到很方便的作用:
比如输入:simpletest, 会自动跳转到http://www.lastcraft.com/simple_test.php,精度还是很准的。我也没有研究,google的手气不错是否会因为个人信息而有不同的结果。如果那样就更好了。
植入方法:
1. 使用浏览器打开about:config
2. 找到keyword.URL, 把值改为:http://www.google.com/search?btnI=I%27m+Feeling+Lucky&q= 保存
搞定!直接敲入一些词试一下吧:)
直接敲rollenc + Enter就可以找到我了哦:)
Defined tags for this entry: ,

Posted by rollenc

Last modified on 2007-05-14 01:15
2007/05 5
我被要求在不能理解需求的情况下重构和修改功能。。。。。。。。

Posted by rollenc

Last modified on 2007-05-05 23:22
2007/05 3
最近比较迷茫了。
在职业上来讲,自己并不知道自己要做什么了。架构师的目标好像离我远了很多。现在对团队的一种失望,使我对团队的寻找产生了极大的茫然。但编码工的工作并不是我追求的工作,任务一个接一个的来,像掉进了潘多拉的魔盒,没完没了。所以我也理解了为什么没有文档,也对我自己在情急之下使用的ctrl+C和ctrl+V的操作感到非常的鄙视。
一天8小时以上的编码,没有学习时间,没有培训机会。我想,这不是我追求的生活。
单干,没有勇气和对能耐上的怀疑。
团队,我渐渐的在失望。。
谁? 能给我信心!
Defined tags for this entry:

Posted by rollenc

Last modified on 2007-05-06 00:08
2007/05 3
一个目标必须满足SMART标准:
Specific——具体;
Measurable——可以衡量;
Achievable——可以实现;
Realistic——比较现实;
Time-bound——有时间限制。


Posted by rollenc

Last modified on 2007-05-06 08:56
2007/05 3
一直在追寻团队,但未果。目前加入的公司虽然在规模上很大,但是,本组项目都是自给自足型的。需求自己定,任务自己完成,其中在文档上很弱,基本上不能形成一个成文的文档。文档的格式也要命,word或者excel,等到需求变化了,想比较一下两者区别那是不可能的。而且,两个对同一个文件的修改是肯定冲突的。
团队,应该可以不成熟的,成熟的和发展中的。我都不知道自己自己要追求的,到底应该是一个什么样的团队。不成熟的肯定不是,发展中的,由于把速度看在了第一位,如果没有一个很好很强的管理,在开发流程上的成熟度可谓相当地不成熟。成熟的团队?什么是成熟的团队?存在么?
不明白了,从团队的角度来讲,现在的状态我对自己不能做一个很好的解释,在自己的团队学习上,现在在混日子。

Posted by rollenc

Not modified
2007/05 3
以前简单的看过CMM,也被其文档的烦琐而吓到了。还记得一个简单的比方:
CMM1:没有文档
CMM2:有文档
CMM3:有文档的文档
CMM4:有文档的文档的文档
CMM5:有文档的文档的文档的文档

我也只想着去实现一个CMM3的规模。有需求文档(2),这个需求文档由谁提出,谁在何时做了什么样的变更,在什么样的情况下什么地方可能做什么样的变化(3)。实现阶段的设计文档和开发编码文档。考虑到文档的变更,维护多套文档(包括程序)是本麻烦的。本人也常常在编码阶段觉得自己的设计有瑕疵,于是在编码阶段的实现方法就与以前的设计文档有所不同,但一般的,我都没有重视到或者说以结果为主导任务,于是把设计文档这一过程性的文档放在了末位。于是,出现的情况是设计文档和实现并不一致。这也是很多团队不做文档的理由。
需求-》设计-》伪代码-》编码。使用伪代码应该可以很好的保持设计和编码之间的联系,而所有的伪代码全部使用注释的方式写在开发的程序代码中。具体伪代码的实现可以参考《代码大全2》P218。伪代码可以作为一个设计,也可以作为一个子程序或功能的需求。把文档放在程序中,保证文档只有一份。但另外的,以任务为目的的去看别人的源代码是一大头痛的事情,以学习的目的去看优秀的简短的代码才可能是一种享受。所以,文档的撰写可以全部在程序中,但程序文档的分发却需要多种的形式,以达到不同人的需要。因此,这就要求了程序中的使用的文档必须能够被某中工具提取出来,并形成可读性文档。这类的工具包括 javadoc, phpdoc等。在需求或者设计变更,以及其他有需要时生成一次文档,文档以html格式保存,如果每次使用工具时使用的配置相同,那么,两次生成的文档是有可比性的。通过版本管理,很容易追溯文档的变更历史。这就可以形成文档(需求或设计文档)的文档(文档的变更文档)
Defined tags for this entry: ,

Posted by rollenc

Not modified
2007/04 26
Mark 一下。
整理 描述
armscii8 (ARMSCII-8 Armenian)
armscii8_bin 亚美尼亚语, 二进制
armscii8_general_ci 亚美尼亚语, 不区分大小写
ascii (US ASCII)
ascii_bin 西欧 (多语言), 二进制
ascii_general_ci 西欧 (多语言), 不区分大小写
big5 (Big5 Traditional Chinese)
big5_bin 繁体中文, 二进制
big5_chinese_ci 繁体中文, 不区分大小写
binary (Binary pseudo charset)
binary 二进制
cp1250 (Windows Central European)
cp1250_bin 中欧 (多语言), 二进制
cp1250_croatian_ci 克罗地亚语, 不区分大小写
cp1250_czech_cs 捷克语, 区分大小写
cp1250_general_ci 中欧 (多语言), 不区分大小写
cp1251 (Windows Cyrillic)
cp1251_bin 西里尔语 (多语言), 二进制
cp1251_bulgarian_ci 保加利亚语, 不区分大小写
cp1251_general_ci 西里尔语 (多语言), 不区分大小写
cp1251_general_cs 西里尔语 (多语言), 区分大小写
cp1251_ukrainian_ci 乌克兰语, 不区分大小写
cp1256 (Windows Arabic)
cp1256_bin 阿拉伯语, 二进制
cp1256_general_ci 阿拉伯语, 不区分大小写
cp1257 (Windows Baltic)
cp1257_bin 巴拉克语 (多语言), 二进制
cp1257_general_ci 巴拉克语 (多语言), 不区分大小写
cp1257_lithuanian_ci 立陶宛语, 不区分大小写
cp850 (DOS West European)
cp850_bin 西欧 (多语言), 二进制
cp850_general_ci 西欧 (多语言), 不区分大小写
cp852 (DOS Central European)
cp852_bin 中欧 (多语言), 二进制
cp852_general_ci 中欧 (多语言), 不区分大小写
cp866 (DOS Russian)
cp866_bin 俄语, 二进制
cp866_general_ci 俄语, 不区分大小写
cp932 (SJIS for Windows Japanese)
cp932_bin 日语, 二进制
cp932_japanese_ci 日语, 不区分大小写
dec8 (DEC West European)
dec8_bin 西欧 (多语言), 二进制
dec8_swedish_ci 瑞典语, 不区分大小写
eucjpms (UJIS for Windows Japanese)
eucjpms_bin 日语, 二进制
eucjpms_japanese_ci 日语, 不区分大小写
euckr (EUC-KR Korean)
euckr_bin 朝鲜语, 二进制
euckr_korean_ci 朝鲜语, 不区分大小写
gb2312 (GB2312 Simplified Chinese)
gb2312_bin 简体中文, 二进制
gb2312_chinese_ci 简体中文, 不区分大小写
gbk (GBK Simplified Chinese)
gbk_bin 简体中文, 二进制
gbk_chinese_ci 简体中文, 不区分大小写
geostd8 (GEOSTD8 Georgian)
geostd8_bin 乔治亚语, 二进制
geostd8_general_ci 乔治亚语, 不区分大小写
greek (ISO 8859-7 Greek)
greek_bin 希腊语, 二进制
greek_general_ci 希腊语, 不区分大小写
hebrew (ISO 8859-8 Hebrew)
hebrew_bin 希伯来语, 二进制
hebrew_general_ci 希伯来语, 不区分大小写
hp8 (HP West European)
hp8_bin 西欧 (多语言), 二进制
hp8_english_ci 英语, 不区分大小写
keybcs2 (DOS Kamenicky Czech-Slovak)
keybcs2_bin 捷克斯洛伐克语, 二进制
keybcs2_general_ci 捷克斯洛伐克语, 不区分大小写
koi8r (KOI8-R Relcom Russian)
koi8r_bin 俄语, 二进制
koi8r_general_ci 俄语, 不区分大小写
koi8u (KOI8-U Ukrainian)
koi8u_bin 乌克兰语, 二进制
koi8u_general_ci 乌克兰语, 不区分大小写
latin1 (cp1252 West European)
latin1_bin 西欧 (多语言), 二进制
latin1_danish_ci 丹麦语, 不区分大小写
latin1_general_ci 西欧 (多语言), 不区分大小写
latin1_general_cs 西欧 (多语言), 区分大小写
latin1_german1_ci 德语 (字典), 不区分大小写
latin1_german2_ci 德语 (电话本), 不区分大小写
latin1_spanish_ci 西班牙语, 不区分大小写
latin1_swedish_ci 瑞典语, 不区分大小写

整理 描述
latin2 (ISO 8859-2 Central European)
latin2_bin 中欧 (多语言), 二进制
latin2_croatian_ci 克罗地亚语, 不区分大小写
latin2_czech_cs 捷克语, 区分大小写
latin2_general_ci 中欧 (多语言), 不区分大小写
latin2_hungarian_ci 匈牙利语, 不区分大小写
latin5 (ISO 8859-9 Turkish)
latin5_bin 土耳其语, 二进制
latin5_turkish_ci 土耳其语, 不区分大小写
latin7 (ISO 8859-13 Baltic)
latin7_bin 巴拉克语 (多语言), 二进制
latin7_estonian_cs 爱沙尼亚语, 区分大小写
latin7_general_ci 巴拉克语 (多语言), 不区分大小写
latin7_general_cs 巴拉克语 (多语言), 区分大小写
macce (Mac Central European)
macce_bin 中欧 (多语言), 二进制
macce_general_ci 中欧 (多语言), 不区分大小写
macroman (Mac West European)
macroman_bin 西欧 (多语言), 二进制
macroman_general_ci 西欧 (多语言), 不区分大小写
sjis (Shift-JIS Japanese)
sjis_bin 日语, 二进制
sjis_japanese_ci 日语, 不区分大小写
swe7 (7bit Swedish)
swe7_bin 瑞典语, 二进制
swe7_swedish_ci 瑞典语, 不区分大小写
tis620 (TIS620 Thai)
tis620_bin 泰语, 二进制
tis620_thai_ci 泰语, 不区分大小写
ucs2 (UCS-2 Unicode)
ucs2_bin Unicode (多语言), 二进制
ucs2_czech_ci 捷克语, 不区分大小写
ucs2_danish_ci 丹麦语, 不区分大小写
ucs2_esperanto_ci Esperanto, 不区分大小写
ucs2_estonian_ci 爱沙尼亚语, 不区分大小写
ucs2_general_ci Unicode (多语言), 不区分大小写
ucs2_hungarian_ci 匈牙利语, 不区分大小写
ucs2_icelandic_ci 冰岛语, 不区分大小写
ucs2_latvian_ci 拉脱维亚语, 不区分大小写
ucs2_lithuanian_ci 立陶宛语, 不区分大小写
ucs2_persian_ci 波斯语, 不区分大小写
ucs2_polish_ci 波兰语, 不区分大小写
ucs2_roman_ci 西欧, 不区分大小写
ucs2_romanian_ci 罗马尼亚语, 不区分大小写
ucs2_slovak_ci 斯洛伐克语, 不区分大小写
ucs2_slovenian_ci 斯洛文尼亚语, 不区分大小写
ucs2_spanish2_ci 传统西班牙语, 不区分大小写
ucs2_spanish_ci 西班牙语, 不区分大小写
ucs2_swedish_ci 瑞典语, 不区分大小写
ucs2_turkish_ci 土耳其语, 不区分大小写
ucs2_unicode_ci Unicode (多语言), 不区分大小写
ujis (EUC-JP Japanese)
ujis_bin 日语, 二进制
ujis_japanese_ci 日语, 不区分大小写
utf8 (UTF-8 Unicode)
utf8_bin Unicode (多语言), 二进制
utf8_czech_ci 捷克语, 不区分大小写
utf8_danish_ci 丹麦语, 不区分大小写
utf8_esperanto_ci Esperanto, 不区分大小写
utf8_estonian_ci 爱沙尼亚语, 不区分大小写
utf8_general_ci Unicode (多语言), 不区分大小写
utf8_hungarian_ci 匈牙利语, 不区分大小写
utf8_icelandic_ci 冰岛语, 不区分大小写
utf8_latvian_ci 拉脱维亚语, 不区分大小写
utf8_lithuanian_ci 立陶宛语, 不区分大小写
utf8_persian_ci 波斯语, 不区分大小写
utf8_polish_ci 波兰语, 不区分大小写
utf8_roman_ci 西欧, 不区分大小写
utf8_romanian_ci 罗马尼亚语, 不区分大小写
utf8_slovak_ci 斯洛伐克语, 不区分大小写
utf8_slovenian_ci 斯洛文尼亚语, 不区分大小写
utf8_spanish2_ci 传统西班牙语, 不区分大小写
utf8_spanish_ci 西班牙语, 不区分大小写
utf8_swedish_ci 瑞典语, 不区分大小写
utf8_turkish_ci 土耳其语, 不区分大小写
utf8_unicode_ci Unicode (多语言), 不区分大小写
Defined tags for this entry: ,

Posted by rollenc

Last modified on 2007-04-26 05:04
2007/04 25
这篇文章是mysql的交互式文章。目前并不足1000条,将来也不止1000条。需要大家努力。
原文见:http://forge.mysql.com/wiki/Top10SQLPerformanceTips

Specific Query Performance Tips (see also database design tips for tips on indexes):

1. Use EXPLAIN to profile the query execution plan
2. Use Slow Query Log (always have it on!)
3. Don't use DISTINCT when you have or could use GROUP BY
4. Insert performance
1. Batch INSERT and REPLACE
2. Use LOAD DATA instead of INSERT
5. LIMIT m,n may not be as fast as it sounds
6. Don't use ORDER BY RAND() if you have > ~2K records
7. Use SQL_NO_CACHE when you are SELECTing frequently updated data or large sets of data
8. Avoid wildcards at the start of LIKE queries
9. Avoid correlated subqueries and in select and where clause (try to avoid in)
10. No calculated comparisons -- isolate indexed columns
11. ORDER BY and LIMIT work best with equalities and covered indexes
12. Separate text/blobs from metadata, don't put text/blobs in results if you don't need them
13. Derived tables (subqueries in the FROM clause) can be useful for retrieving BLOBs without sorting them. (Self-join can speed up a query if 1st part finds the IDs and uses then to fetch the rest)
14. ALTER TABLE...ORDER BY can take data sorted chronologically and re-order it by a different field -- this can make queries on that field run faster (maybe this goes in indexing?)
15. Know when to split a complex query and join smaller ones
16. Delete small amounts at a time if you can
17. Make similar queries consistent so cache is used
18. Have good SQL query standards
19. Don't use deprecated features
20. Turning OR on multiple index fields (<5.0) into UNION may speed things up (with LIMIT), after 5.0 the index_merge should pick stuff up.
21. Don't use COUNT * on Innodb tables for every search, do it a few times and/or summary tables, or if you need it for the total # of rows, use SQL_CALC_FOUND_ROWS and SELECT FOUND_ROWS()
22. Use INSERT ... ON DUPLICATE KEY update (INSERT IGNORE) to avoid having to SELECT
23. use groupwise maximum instead of subqueries


Scaling Performance Tips:

1. Use benchmarking
2. isolate workloads don't let administrative work interfere with customer performance. (ie backups)
3. Debugging sucks, testing rocks!
4. As your data grows, indexing may change (cardinality and selectivity change). Structuring may want to change. Make your schema as modular as your code. Make your code able to scale. Plan and embrace change, and get developers to do the same.

Network Performance Tips:

1. Minimize traffic by fetching only what you need.
1. Paging/chunked data retrieval to limit
2. Don't use SELECT *
3. Be wary of lots of small quick queries if a longer query can be more efficient
2. Use multi_query if appropriate to reduce round-trips

OS Performance Tips:

1. Use proper data partitions
1. For Cluster. Start thinking about Cluster *before* you need them
2. Keep the database host as clean as possible. Do you really need a windowing system on that server?
3. Utilize the strengths of the OS
4. pare down cron scripts
5. create a test environment
6. source control schema and config files
7. for LVM innodb backups, restore to a different instance of MySQL so Innodb can roll forward
8. partition appropriately
9. partition your database when you have real data -- do not assume you know your dataset until you have real data

MySQL Server Overall Tips:

1. innodb_flush_commit=0 can help slave lag
2. Optimize for data types, use consistent data types. Use PROCEDURE ANALYSE() to help determine the smallest data type for your needs.
3. use optimistic locking, not pessimistic locking. try to use shared lock, not exclusive lock. share mode vs. FOR UPDATE
4. if you can, compress text/blobs
5. compress static data
6. don't back up static data as often
7. enable and increase the query and buffer caches if appropriate
8. config params -- http://docs.cellblue.nl/2007/03/17/easy-mysql-performance-tweaks/ is a good reference
9. Config variables & tips:
1. use one of the supplied config files
2. key_buffer, unix cache (leave some RAM free), per-connection variables, innodb memory variables
3. be aware of global vs. per-connection variables
4. check SHOW STATUS and SHOW VARIABLES (GLOBAL|SESSION in 5.0 and up)
5. be aware of swapping esp. with Linux, "swappiness" (bypass OS filecache for innodb data files, innodb_flush_method=O_DIRECT if possible (this is also OS specific))
6. defragment tables, rebuild indexes, do table maintenance
7. If you use innodb_flush_txn_commit=1, use a battery-backed hardware cache write controller
8. more RAM is good so faster disk speed
9. use 64-bit architectures
10. --skip-name-resolve
11. increase myisam_sort_buffer_size to optimize large inserts (this is a per-connection variable)
12. look up memory tuning parameter for on-insert caching
13. increase temp table size in a data warehousing environment (default is 32Mb) so it doesn't write to disk (also constrained by max_heap_table_size, default 16Mb)
14. Run in SQL_MODE=STRICT to help identify warnings
15. /tmp dir on battery-backed write cache
16. consider battery-backed RAM for innodb logfiles
17. use --safe-updates for client
18. Redundant data is redundant

Storage Engine Performance Tips:

1. InnoDB ALWAYS keeps the primary key as part of each index, so do not make the primary key very large
2. Utilize different storage engines on master/slave ie, if you need fulltext indexing on a table.
3. BLACKHOLE engine and replication is much faster than FEDERATED tables for things like logs.
4. Know your storage engines and what performs best for your needs, know that different ones exist.
1. ie, use MERGE tables ARCHIVE tables for logs
2. Archive old data -- don't be a pack-rat! 2 common engines for this are ARCHIVE tables and MERGE tables
5. use row-level instead of table-level locking for OLTP workloads
6. try out a few schemas and storage engines in your test environment before picking one.

Database Design Performance Tips:

1. Design sane query schemas. don't be afraid of table joins, often they are faster than denormalization
2. Don't use boolean flags
3. Use Indexes
4. Don't Index Everything
5. Do not duplicate indexes
6. Do not use large columns in indexes if the ratio of SELECTs:INSERTs is low.
7. be careful of redundant columns in an index or across indexes
8. Use a clever key and ORDER BY instead of MAX
9. Normalize first, and denormalize where appropriate.
10. Databases are not spreadsheets, even though Access really really looks like one. Then again, Access isn't a real database
11. use INET_ATON and INET_NTOA for IP addresses, not char or varchar
12. make it a habit to REVERSE() email addresses, so you can easily search domains (this will help avoid wildcards at the start of LIKE queries if you want to find everyone whose e-mail is in a certain domain)
13. A NULL data type can take more room to store than NOT NULL
14. Choose appropriate character sets & collations -- UTF16 will store each character in 2 bytes, whether it needs it or not, latin1 is faster than UTF8.
15. Use Triggers wisely
16. use min_rows and max_rows to specify approximate data size so space can be pre-allocated and reference points can be calculated.
17. Use HASH indexing for indexing across columns with similar data prefixes
18. Use myisam_pack_keys for int data
19. be able to change your schema without ruining functionality of your code
20. segregate tables/databases that benefit from different configuration variables

Other:

1. Hire a MySQL (tm) Certified DBA
2. Know that there are many consulting companies out there that can help, as well as MySQL's Professional Services.
3. Read and post to MySQL Planet at http://www.mysqlplanet.org
4. Attend the yearly MySQL Conference and Expo or other conferences with MySQL tracks (link to the conference here)
5. Support your local User Group (link to forge page w/user groups here)
Defined tags for this entry:

Posted by rollenc

Last modified on 2007-04-25 11:36

(Page 17 of 34, totaling 497 entries)