select tid,fadate,inter_user,reader,title from table_name1 where fadate>'2013-1-1'order by fadate --用时:6390毫秒 select tid,fadate,inter_user,reader,title from table_name1 where fadate<'2013-1-1'order by fadate --用时:6453毫秒
(五)其他注意事项
“水可载舟,亦可覆舟”,索引也一样。索引有助于提高检索性能,但过多或不当的索引也会导致系统低效。因为用户在表中每加进一个索引,
数据库就要做更多的工作。过多的索引甚至会导致索引碎片。
所以说,我们要建立一个“适当”的索引体系,特别是对聚合索引的创建,更应精益求精,以使您的数据库能得到高性能的发挥。