Differences between INDEX, PRIMARY, UNIQUE, FULLTEXT in MySQL?
487down vote
|
Differences
Similarities
|
||||||||||||||||
|
- Uninteresting
- Misleading
- Offensive
- Repetitive
- Other
All of these are kinds of indices. primary: must be unique, is an index, is (likely) the physical index, can be only one per table. unique: as it says. You can't have more than one row with a tuple of this value. Note that since a unique key can be over more than one column, this doesn't necessarily mean that each individual column in the index is unique, but that each combination of values across these columns is unique. index: if it's not primary or unique, it doesn't constrain values inserted into the table, but it does allow them to be looked up more efficiently. fulltext: a more specialized form of indexing that allows full text search. Think of it as (essentially) creating an "index" for each "word" in the specified column. |
|||||
|
I feel like this has been well covered, maybe except for the following:
http://stackoverflow.com/questions/707874/differences-between-index-primary-unique-fulltext-in-mysql |
Differences between INDEX, PRIMARY, UNIQUE, FULLTEXT in MySQL?的更多相关文章
- MYSQL的索引类型:PRIMARY, INDEX,UNIQUE,FULLTEXT,SPAIAL 有什么区别?各适用于什么场合?
一.介绍一下索引的类型 Mysql常见索引有:主键索引.唯一索引.普通索引.全文索引.组合索引PRIMARY KEY(主键索引) ALTER TABLE `table_name` ADD PRIMAR ...
- INDEX && PRIMARY KEY && UNIQUE KEY
When I have do some sql tody, some confusion come up to me. Its about the index && PRIMARY K ...
- Oracle primary,unique,foreign 区别,Hibernate 关联映射
Oracle primary,unique,foreign 区别 转:http://www.cnblogs.com/henw/archive/2012/08/15/2639510.html NOT N ...
- MYSQL的索引类型:PRIMARY, INDEX,UNIQUE,FULLTEXT,SPAIAL 区别与使用场合
normal 普通索引 unique 唯一的,不允许重复的索引 该字段信息保证不会重复例如身份证号用作索引时,可设置为unique full textl 全文搜索的索引 FULLTEXT 用于搜索 ...
- SQL Server Primary key 、clustered index 、 unique
primary key: 1.主键不可以有空值. 2.不可以有重复行. unique : 1.可以有空行. 2.不可以有重复行. clustered index: 1.可以有重复行. 2.可以有空行. ...
- MySQL常用SQL整理
MySQL常用SQL整理 一.DDL #创建数据库 CREATE DATABASE IF NOT EXISTS product DEFAULT CHARSET utf8 COLLATE utf8_ge ...
- mysql添加索引和sql分析
mysql索引操作 查看索引 show indexes from students; #students为表名 mysql添加索引命令 创建索引 .PRIMARY KEY(主键索引) mysql> ...
- MySQL详解(25)-----------MySQL性能优化
1. 简介 在Web应用程序体系架构中,数据持久层(通常是一个关系数据库)是关键的核心部分,它对系统的性能有非常重要的影响.MySQL是目前使用最多的开源数据库,但是MySQL数据库的默认设置性 ...
- Mysql数据库调优和性能优化
1. 简介 在Web应用程序体系架构中,数据持久层(通常是一个关系数据库)是关键的核心部分,它对系统的性能有非常重要的影响.MySQL是目前使用最多的开源数据库,但是mysql数据库的默认设置性能非常 ...
随机推荐
- [ASP.NET MVC 小牛之路]18 - Web API
Web API 是ASP.NET平台新加的一个特性,它可以简单快速地创建Web服务为HTTP客户端提供API.Web API 使用的基础库是和一般的MVC框架一样的,但Web API并不是MVC框架的 ...
- Highchart.js
Highcharts所有的源代码及例子均可通过官网下载得到.初学者只需要简单的修改官方提供的例子即可了解Highcharts. 下载 最新版本:Highcharts 3.0.10.Highstock ...
- Uiautomator 2.0之Configrator类学习小记
1. Configration类介绍 1.1. Configrator用于设置脚本动作的默认延时 1.2 Configrator功能: 1.2.1 可调节两个模拟动作之间的默认间隔 1.2.2 可调 ...
- js高程读书笔记(第4章--变量、作用域和内存)
JavaScript变量松散类型的本质,决定了它只是在特定时间用于保存特定值的一个名字而已.由于不存在定义某个变量必须要保存何总数据类型值的规则,变量的值及其数据类型可以在脚本的生命周期内改变. 1. ...
- Sql Server系列:查询分页语句
1 利用临时表分页 分页存储过程: CREATE PROCEDURE [USP_Product_GetPaged] ), ), @PageIndex INT, @PageSize INT AS BEG ...
- Jetstrap 在线构建 Bootstrap 的工具
Jetstrap 是一个 100% 基于 Web 的 Twitter Bootstrap 构建工具,无需下载软件,只需登录并构建即可.并且别人可以访问你构建的产品.
- OpenNURBS to OpenCASCADE
OpenNURBS to OpenCASCADE eryar@163.com Abstract. The OpenNURBS initiative provides CAD/CAM/CAE and c ...
- 平衡二叉树AVL插入
平衡二叉树(Balancedbinary tree)是由阿德尔森-维尔斯和兰迪斯(Adelson-Velskiiand Landis)于1962年首先提出的,所以又称为AVL树. 定义:平衡二叉树或为 ...
- ES6 - Note2:解构赋值
ES6的解构赋值就是利用模式匹配从按照一定模式的数组或者对象中提取值赋值给变量. 1.数组的解构赋值 在ES6以前,变量的赋值是直接指定的,以后可以这么来写,如下所示 let [a,b,c] = [1 ...
- 生成Kindle可读的mobi和PDF电子书
购买kindle之后,自然欣喜万分,不来自于工具本身,而来自于发现自己能够静下心来阅读长篇和复杂的文字了,可喜可贺.更重要的是,kindle减轻了我眼睛的莫大的压力.但马上就出现几个问题: 不是所有的 ...