2011年5月6日
摘要: Database operations often tend to be the main bottleneck for most web applications today. It’s not only the DBA’s (database administrators) that have to worry about these performance issues. We as programmers need to do our part by structuring tables properly, writing optimized queries and better co 阅读全文
posted @ 2011-05-06 20:05 Miracle刘 阅读(191) 评论(0) 推荐(0)
摘要: MySQL数据库优化处理实现千万级快速分页分析,来看下吧。数据表 collect ( id, title ,info ,vtype) 就这4个字段,其中 title 用定长,info 用text, id 是逐渐,vtype是tinyint,vtype是索引。这是一个基本的新闻系统的简单模型。现在往里面填充数据,填充10万篇新闻。最后collect 为 10万条记录,数据库表占用硬盘1.6G。OK ,看下面这条sql语句:select id,title from collect limit 1000,10; 很快;基本上0.01秒就OK,再看下面的select id,title from col 阅读全文
posted @ 2011-05-06 18:47 Miracle刘 阅读(341) 评论(0) 推荐(0)