问题报告 纠错本页面

F.4. btree_gin

btree_gin提供简单的 GIN操作符类实现数据类型int2, int4, int8, float4, float8, timestamp with time zone, timestamp without time zone, time with time zone, time without time zone, date, interval, oid, money, "char", varchar, text, bytea, bit, varbit, macaddr, inetcidr的 B-tree等价操作。

总的来说,这些操作符类不会超过等值标准的B树索引方法, 他们缺乏标准B树代码的一个主要特点:强制唯一性的能力。然而, 它们对GIN测试是有用的,并且作为开发其他GIN操作符类的基础。 同时,对于查询,同时测试了GIN可索引列和B树可索引列, 对于创建使用这些操作符类之一的多列GIN索引比创建 通过位图与进行联合的两个独立索引更加有效。

F.4.1. 例子用法

CREATE TABLE test (a int4);
-- 创建索引
CREATE INDEX testidx ON test USING gin (a);
-- 查询
SELECT * FROM test WHERE a < 10;

F.4.2. 作者

Teodor Sigaev ()和 Oleg Bartunov ()。参阅 http://www.sai.msu.su/~megera/oddmuse/index.cgi/Gin 获取额外信息。