MySQL索引类型 normal, unique, full text的区别

2015-5-12 liyangweb.com 李杨 MySQL

normal:表示普通索引

unique:表示唯一的,不允许重复的索引,如果该字段信息保证不会重复例如身份证号用作索引时,可设置为unique

full textl: 表示 全文搜索的索引。 FULLTEXT 用于搜索很长一篇文章的时候,效果最好。用在比较短的文本,如果就一两行字的,普通的 INDEX 也可以。

索引的类别由建立索引的字段内容特性来决定,通常normal最常见。

 

为了使索引的使用效率更高,在创建索引时,必须考虑在哪些字段上创建索引和创建什么类型的索引,有7大原则:

1.选择唯一性索引

2.为经常需要排序、分组和联合操作的字段建立索引

3.为常作为查询条件的字段建立索引

4.限制索引的数目

5.尽量使用数据量少的索引

6.尽量使用前缀来索引

7.删除不再使用或者很少使用的索引

 

标签: mysql 索引

评论:

imovieye
2019-01-22 20:31
<a href="http://www.salesmasterypro.net/jordan-13-wei%C3%9F-schwarz-grau-obuve">jordan 13 wei脽 schwarz grau</a> <a href="http://www.sastafitness.net/nike-air-max-tailwind-6-femmes-rouge-noir-butya">nike air max tailwind 6 femmes rouge noir</a> <a href="http://www.sattonet.net/nike-free-run-5.0-rosso-and-bianca-lines-butya">nike free run 5.0 rosso and bianca lines</a> <a href="http://www.savetheastrodome.net/adidas-porsche-design-corriendo-zapatos-on-venta-obuve">adidas porsche design corriendo zapatos on venta</a> <a href="http://www.schildgen.net/maschio-asics-gel-sendai-2-rosa-blu-scarped">maschio asics gel sendai 2 rosa blu</a> <a href="http://www.scogblog.net/adidas-projoator-trx-fg-powerswerve-schuhef">adidas projoator trx fg powerswerve</a>
imovieye http://www.imovieye.net/
h732y4ki
2019-01-13 15:47
<a href="http://www.n241j7ek.com/flyknit-lunar-1-armada-multi-match-kurpesc">flyknit lunar 1 armada multi match</a> <a href="http://www.96hsmdlv.com/mennns-nike-free-5.0-r%C3%B8d-gull-butya">mennns nike free 5.0 r酶d gull</a> <a href="http://www.q917gblp.com/nike-max-zero-b%C3%B8rn-gr%C3%B8n-gr%C3%A5-schuheg">nike max zero b酶rn gr酶n gr氓</a> <a href="http://www.ca73cmji.com/nike-free-run-2-armada-and-blanco-jordans-butyf">nike free run 2 armada and blanco jordans</a> <a href="http://www.ahx2859h.com/hombres-asics-gel-quantum-360-p%C3%BArpura-plata-butya">hombres asics gel quantum 360 p煤rpura plata</a> <a href="http://www.1mjfeeng.com/kvinners-nike-air-max-1-bl%C3%A5-gul-obuvc">kvinners nike air max 1 bl氓 gul</a>
h732y4ki http://www.h732y4ki.com/
tickboxit
2019-01-10 08:09
<a href="http://www.coderfinca.com/puma-evospeed-1.4-sl-fg-soccer-boots-cleats-rosa-schwarz-chaussuresa">puma evospeed 1.4 sl fg soccer boots cleats rosa schwarz</a> <a href="http://www.deedeephelps.com/air-max-1-wei%C3%9F-pack-schuhee">air max 1 wei脽 pack</a> <a href="http://www.domcilios.com/hommes-asics-gel-kinsei-5-noir-blanc-scarpea">hommes asics gel kinsei 5 noir blanc</a> <a href="http://www.hartsigsupply.com/nike-roshe-run-schwarz-charcoal-herren-trainers-kurpesf">nike roshe run schwarz charcoal herren trainers</a> <a href="http://www.iptvpackage.com/nfl-womens-nike-buffalo-bills-34-thurman-thomas-royal-blue-name-number-logo-t-shirt-nflr">nfl womens nike buffalo bills 34 thurman thomas royal blue name number logo t shirt</a> <a href="http://www.nishajagmohan.com/nike-free-run-3-5.0-rojo-rocks-kurpesf">nike free run 3 5.0 rojo rocks</a>
tickboxit http://www.tickboxit.com/
tumpuanlar
2018-12-29 18:43
<a href="http://www.hungrygatorpr.com/nike-hyperrev-2015-jade-bleu-rouge-kurpesa">nike hyperrev 2015 jade bleu rouge</a> <a href="http://www.jonvietor.com/nike-zoom-structure-18-bl%C3%A5-oransje-kurpesf">nike zoom structure 18 bl氓 oransje</a> <a href="http://www.mbejobs.com/kvinners-big-pony-polo-bl%C3%A5-rosa-poloz">kvinners big pony polo bl氓 rosa</a> <a href="http://www.refoodle.com/air-jordan-b-mo-verde-cielo-blu-scarpec">air jordan b mo verde cielo blu</a> <a href="http://www.toilocadeau.com/ducks-13-teemu-selanne-red-ccm-throwback-stitched-nhl-jersey-nfls">ducks 13 teemu selanne red ccm throwback stitched nhl jersey</a> <a href="http://www.wlstoday.com/nike-roshe-run-insole-for-verkauf-jacksonville-fl-scarpeg">nike roshe run insole for verkauf jacksonville fl</a>
tumpuanlar http://www.tumpuanlar.com/
sulilaw
2018-12-29 08:52
<a href="http://www.gccqueens.com/air-jordan-retro-4.5-p%C3%BArpura-negro-butyd">air jordan retro 4.5 p煤rpura negro</a> <a href="http://www.diumsolution.com/nike-air-max-90-or-noir-kurpesc">nike air max 90 or noir</a> <a href="http://www.daybel.com/flyknit-lunar-1-lila-heart-schuhea">flyknit lunar 1 lila heart</a> <a href="http://www.marybethyates.com/adidas-zx-750-gris-noir-edition-kurpesf">adidas zx 750 gris noir edition</a> <a href="http://www.jaskcsun.com/nike-kyrie-3-marinen-pants-chaussuresa">nike kyrie 3 marinen pants</a> <a href="http://www.maromina.com/air-max-90-ultra-breathe-rosso-kurpesg">air max 90 ultra breathe rosso</a>
[url=http://www.sulilaw.com/]sulilaw[/url]
et606lut
2018-12-26 22:26
<a href="http://www.suopbhi0.com/maschio-nike-air-huarache-light-tutti-grigio-obuva">maschio nike air huarache light tutti grigio</a> <a href="http://www.rpus144x.com/air-jordan-11-argento-grigio-obuve">air jordan 11 argento grigio</a> <a href="http://www.064eaffu.com/nike-air-max-lunar-1-rosso-viola-obuvf">nike air max lunar 1 rosso viola</a> <a href="http://www.2g9s16lv.com/nike-free-tr-fit-4-volt-cool-gr%C3%A5-schuhef">nike free tr fit 4 volt cool gr氓</a> <a href="http://www.waxhq23s.com/air-jordan-retro-4.5-bleu-ciel-gris-kurpesd">air jordan retro 4.5 bleu ciel gris</a> <a href="http://www.2pdyrpwy.com/dam%C3%A4nner-nike-air-max-90-wei%C3%9F-gold-butyf">dam盲nner nike air max 90 wei脽 gold</a>
et606lut http://www.et606lut.com/

发表评论:

Powered by emlog 冀ICP备13011830号-1