Heim > Datenbank > MySQL-Tutorial > Informix索引性能调优的建议

Informix索引性能调优的建议

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Freigeben: 2016-06-07 17:16:30
Original
1000 Leute haben es durchsucht

索引性能:1、对于类似char(100)这样的字段不要设计为index2、Index的字段个数不要超过3个3、Index上也会加锁,所以会造成新的

索引性能:

1、对于类似char(100)这样的字段不要设计为index

2、Index的字段个数不要超过3个

3、Index上也会加锁,所以会造成新的锁的性能问题

4、Index尽量不避免使用,index是用的空间换取的性能方式,即使查询加速了也会导致insert等DML操作变慢

5、Index中的使用的字段的顺序有讲究,不要随意

6、静态表数据不发生变换的表最多index个数不要超过5-8个

7、OLTP系统业务操作表创建2-5个索引

8、OLAP系统可以创建5-8个索引

9、哪些字段建立索引,where条件中的才可以建索引,表关联的groupby,orderby可以建索引,但是对于交易性的系统中的orderby不要建索引,要根据实际情况,要看结果记录有多少,如果比较少,比如几千条以内不要建索引

10、索引中的字段比如C1有103个,C2有2个不同的值,C3有100个,那么C2就不要作为字段

11、避免建复合索引的情况是大字段,C2建立后记录数和C2前记录数相差很少的时候也不需要建立索引

12、避免使用like,避免索引列上使用函数,避免索引上使用is null或is not null,,避免使用!=

13、避免改变索引列的类型,避免使用having子句

linux

Verwandte Etiketten:
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage