postgresql建索引
- 作者: 小狐仙Bobi
- 来源: 51数据库
- 2020-09-26
问题源自一个帅哥在建索引发生表锁的问题。先介绍一下Postgresql的建索引语法:Version:9.1CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ name ] ON table [ USING method ]( { column | ( expression ) } [ COLLATE collation ] [ opclass ] [ A...
问题源自一个帅哥在建索引发生表锁的问题。先介绍一下postgresql的建索引语法:
version:9.1
create [ unique ] index [ concurrently ] [ name ] on table [ using method ]
( { column | ( expression ) } [ collate collation ] [ opclass ] [ asc | desc ] [ nulls { first | last } ] [, ...] )
[ with ( storage_parameter = value [, ... ] ) ]
[ tablespace tablespace ]
[ where predicate ]
这里不解释语法的诸多参数使用(排序,使用方法,填充因子等),主要说一下concurrently的使用场景。
问题源自一个帅哥在建索引发生表锁的问题。先介绍一下postgresql的建索引语法:
version:9.1
create [ unique ] index [ concurrently ] [ name ] on table [ using method ]
( { column | ( expression ) } [ collate collation ] [ opclass ] [ asc | desc ] [ nulls { first | last } ] [, ...] )
[ with ( storage_parameter = value [, ... ] ) ]
[ tablespace tablespace ]
[ where predicate ]
这里不解释语法的诸多参数使用(排序,使用方法,填充因子等),主要说一下concurrently的使用场景。
推荐阅读
