You can add an index on a column that can have NULL values if you are using the MyISAM, InnoDB, or MEMORY storage engine.
w
https://dev.mysql.com/doc/refman/5.7/en/create-index.html
MySQL :: MySQL 5.7 Reference Manual :: B.5.4.3 Problems with NULL Values
https://dev.mysql.com/doc/refman/5.7/en/problems-with-null.html
You can add an index on a column that can have NULL
values if you are using the MyISAM
, InnoDB
, or MEMORY
storage engine. Otherwise, you must declare an indexed column NOT NULL
, and you cannot insert NULL
into the column.
MySQL :: MySQL 5.7 Reference Manual :: 14.1.14 CREATE INDEX Syntax
https://dev.mysql.com/doc/refman/5.7/en/create-index.html
The MyISAM
, InnoDB
, NDB
, and ARCHIVE
storage engines support spatial columns such as (POINT
and GEOMETRY
. (Section 12.5, “Extensions for Spatial Data”, describes the spatial data types.) However, support for spatial column indexing varies among engines. Spatial and nonspatial indexes are available according to the following rules.
Spatial indexes (created using SPATIAL INDEX
) have these characteristics:
Characteristics of nonspatial indexes (created with INDEX
, UNIQUE
, or PRIMARY KEY
):
Permitted for any storage engine that supports spatial columns except
ARCHIVE
.Columns can be
NULL
unless the index is a primary key.For each spatial column in a non-
SPATIAL
index exceptPOINT
columns, a column prefix length must be specified. (This is the same requirement as for indexedBLOB
columns.) The prefix length is given in bytes.The index type for a non-
SPATIAL
index depends on the storage engine. Currently, B-tree is used.You can add an index on a column that can have
NULL
values only forInnoDB
,MyISAM
, andMEMORY
tables.You can add an index on a
BLOB
orTEXT
column only for using theInnoDB
andMyISAM
tables.When the
innodb_stats_persistent
setting is enabled, run theANALYZE TABLE
statement for anInnoDB
table after creating an index on that table.
You can add an index on a column that can have NULL values if you are using the MyISAM, InnoDB, or MEMORY storage engine.的更多相关文章
- Java ArrayList add(int index, E element) example
Simple add() method is used for adding an element at the end of the list however there is another va ...
- MongoDB Sort op eration used more than the maximum 33554432 bytes of RAM. Add an index, or speci fy a smaller limit.
最近在获取mongodb某个集合的数据过程中,在进行排序的过程中报错,具体报错信息如下: Error: error: { , "errmsg" : "Executor e ...
- eclips git中的add to Index无效解决
今天在使用eclips git中的add to Index,发现其无效,具体如下 问题描述: 通过export导入一个git java项目 在java工程中新增一个类文件IndicatorCalcTe ...
- sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) Cannot add a NOT NULL column with default value NULL [SQL: u'ALTER TABLE address_scopes ADD COLUMN ip_version INTEGER NOT NULL']
root@hett-virtual-machine:~# su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neu ...
- list.add(int index, E element)和list.addAll(list1)
List.add(int index, E element): 在列表的指定位置插入指定元素(可选操作).将当前处于该位置的元素(如果有的话)和所有后续元素向右移动(在其索引中加 1). 参数:ind ...
- com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'goodsName' cannot be null
com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'goodsName' cannot be n ...
- select 下拉菜单Option对象使用add(elements,index)方法动态添加
原生js 的add函数为下拉菜单增加选项 1.object.add(oElement [, iIndex]) index 可选参数:指定元素放置所在的索引号,整形值.如果没有指定值,将添加到集合的最后 ...
- 关于 NPOI 报 Invalid column index (256). Allowable column range for BIFF8 is (0..255) or ('A'..'IV') 错误的解决办法
当看到这个错误的时候,网上搜索可以会有些说列数有限制之类的说法,这个说法是相对于 Office 2003 的,在 Office 2007 之前,最多只可以创建 列:在 Office 2007 之后, ...
- [转]jQuery: get table column/row index remove table column (by column number)
本文转自:http://www.xinotes.org/notes/note/1087/ <!DOCTYPE html><html><head> <title ...
随机推荐
- selenium从入门到应用 - 8,selenium+testNG实现多线程的并发测试
本系列所有代码 https://github.com/zhangting85/simpleWebtest本文将介绍一个Java+TestNG+Maven+Selenium的web自动化测试脚本环境下s ...
- Visual Studio C++ MFC界面常用参数更改(改变图标,添加控件,调试打印函数等等)
背景 需要使用Visual Studio C++做一些界面.此篇文章既是记录Visual Studio C++在调整界面时常常遇见的问题. 正文 一.如何更改窗体图标,以及生成的.exe图标 更改窗体 ...
- Oracle 查询搜索字符串在哪些存储过程中包含
如下: select *from all_source where OWNER = 'LC0019999'and TEXT like '%insert into%d values(%'
- hdu 4969 Just a Joke(积分)
题目链接:hdu 4969 Just a Joke 题目大意:Guizeyanhua要去追一个女孩,女孩在以Guizeyanhua为圆心,半径为R的圆上匀速运动,女孩的速度为v1,Guizeyanhu ...
- SpringBoot学习小结
基于Spring,简化Spring应用开发的框架,整个Spring技术栈的大整合,J2EE开发的一站式解决方案 优点: 快速创建独立运行的Spring项目以及集成主流框架 使用嵌入式的Servlet容 ...
- ubuntu 环境变量PATH的修改
sudo nano /etc/environment 环 境变量是和Shell紧密相关的,用户登录系统后就启动了一个Shell.对于Linux来说一般是bash,但也可以重新设定或切换到其它的 She ...
- Subversion和TortoiseSVN安装与配置(转)
Subversion为版本控制软件的服务器端. TortoiseSVN为版本控制软件的客户端. 1.下载Subversion与TortoiseSVN. Subversion的地址:http://sub ...
- Atitit .jvm 虚拟机指令详细解释
Atitit .jvm 虚拟机指令详细解释 1. 一.未归类系列A1 2. 数据mov系列2 2.1. 二.const系列2 2.2. 三.push系列2 2.3. ldc系列 该系列命令负责把数值常 ...
- ulimit调优|设置普通用户的ulimit值
个人总结: 如何设置普通用户的ulimit值 1.vim /etc/profile 增加 ulimit -n 10240 source /etc/profile 重新启动就不需要运行这个命令了. 2. ...
- C++ Primer(第五版)读书笔记 & 习题解答 --- Chapter 3
Chapter 3.1 1. using声明具有如下的形式: using namespace::name; Chapter 3.2 1. C++标准一方面对库类型所提供的操作做了规定,另一方面也对库的 ...