バージョンごとのドキュメント一覧

F.8. btree_gin — GIN演算子クラスとB-tree動作 #

<title>btree_gin &mdash; GIN operator classes with B-tree behavior</title>

<filename>btree_gin</filename> provides GIN operator classes that implement B-tree equivalent behavior for the data types <type>int2</type>, <type>int4</type>, <type>int8</type>, <type>float4</type>, <type>float8</type>, <type>timestamp with time zone</type>, <type>timestamp without time zone</type>, <type>time with time zone</type>, <type>time without time zone</type>, <type>date</type>, <type>interval</type>, <type>oid</type>, <type>money</type>, <type>"char"</type>, <type>varchar</type>, <type>text</type>, <type>bytea</type>, <type>bit</type>, <type>varbit</type>, <type>macaddr</type>, <type>macaddr8</type>, <type>inet</type>, <type>cidr</type>, <type>uuid</type>, <type>name</type>, <type>bool</type>, <type>bpchar</type>, and all <type>enum</type> types. btree_ginは、次に列挙するデータ型に対しB-treeと同等な動作を実装するGIN演算子クラスを提供します。データ型は、int2int4int8float4float8timestamp with time zonetimestamp without time zonetime with time zonetime without time zonedateintervaloidmoney"char"varchartextbyteabitvarbitmacaddrmacaddr8inetcidruuidnameboolbpcharおよびすべてのenum型です。

In general, these operator classes will not outperform the equivalent standard B-tree index methods, and they lack one major feature of the standard B-tree code: the ability to enforce uniqueness. However, they are useful for GIN testing and as a base for developing other GIN operator classes. Also, for queries that test both a GIN-indexable column and a B-tree-indexable column, it might be more efficient to create a multicolumn GIN index that uses one of these operator classes than to create two separate indexes that would have to be combined via bitmap ANDing. 一般的に、これらの演算子クラスは同等な標準B-treeインデックス方式を性能的に凌駕する物ではなく、標準B-treeコードの1つの重要機能である一意性強要の能力を欠いています。 しかしながら、GINの試験、およびその他のGIN演算子クラスの開発の基礎として便利です。 同時に、GINインデックス化可能列およびB-treeインデックス化可能列双方を試験する問い合わせに対し、ビットマップを介してANDを取り一体化されるべき2つの別々のインデックスを作成するよりも、これらの演算子クラスの1つを使用する複数列GINインデックスを作成するほうがより効率的です。

This module is considered <quote>trusted</quote>, that is, it can be installed by non-superusers who have <literal>CREATE</literal> privilege on the current database. このモジュールはtrustedと見なされます。つまり、現在のデータベースに対してCREATE権限を持つ非スーパーユーザがインストールできます。

F.8.1. 使用例 #

<title>Example Usage</title>
CREATE TABLE test (a int4);

&#45;- create index

-- インデックスの作成
CREATE INDEX testidx ON test USING GIN (a);

&#45;- query

-- 問い合わせ
SELECT * FROM test WHERE a < 10;

F.8.2. 作者 #

<title>Authors</title>

Teodor Sigaev (<email>teodor@stack.net</email>) and Oleg Bartunov (<email>oleg@sai.msu.su</email>). See <ulink url="http://www.sai.msu.su/~megera/oddmuse/index.cgi/Gin"></ulink> for additional information. Teodor Sigaev()および Oleg Bartunov()。 追加情報はhttp://www.sai.msu.su/~megera/oddmuse/index.cgi/Ginを参照ください。