@@ -2,9 +2,9 @@ hstore_ops - better operator class for hstore
2
2
=============================================
3
3
4
4
hstore_ops extension provides another implementation of GIN index (opclass)
5
- for hstore. It provides smaller index and faster @> operator queries than
6
- default GIN opclass. However, queries containing ?, ?|, ?& operators could
7
- become a little slower.
5
+ for hstore - gin_hstore_hash_ops . It provides smaller index and faster @>
6
+ operator queries than default GIN opclass. However, queries containing ?,
7
+ ?|, ?& operators could become a bit slower.
8
8
9
9
Idea of this opclass is to use composite GIN key which consists of hashes
10
10
of hstore key and value. Thus, search for @> operator is possible as simple
@@ -14,6 +14,12 @@ every kind of search, because of possible hash collision. Hashing provides
14
14
small size of index, mixing key and value into same GIN key provides high
15
15
performance for @> search operator.
16
16
17
+ Also hstore_ops extension contains gin_hstore_bytea_ops - variation of
18
+ standard GIN opclass for hstore where collation key comparison is replaced
19
+ with per-byte comparison. This change doesn't affect any functionality,
20
+ just makes index work faster when collation comparison is slow.
21
+ gin_hstore_bytea_ops was introduced in version 1.1.
22
+
17
23
Authors
18
24
-------
19
25
@@ -52,12 +58,17 @@ Typical installation procedure may look like this:
52
58
$ make USE_PGXS=1 installcheck
53
59
$ psql DB -c "CREATE EXTENSION hstore_ops;"
54
60
61
+ If you used hstore_ops 1.0 then replace last command to upgrade to 1.1.
62
+
63
+ $ psql DB -c "ALTER EXTENSION hstore_ops UPDATE TO '1.1';"
64
+
55
65
Usage
56
66
-----
57
67
58
- Just create index on hstore column using following command .
68
+ Just create index on hstore column using one of following commands .
59
69
60
70
CREATE INDEX index_name ON table_name USING GIN (column_name gin_hstore_hash_ops);
71
+ CREATE INDEX index_name ON table_name USING GIN (column_name gin_hstore_bytea_ops);
61
72
62
73
Index will be automatically used for search on @>, ?, ?|, ?& operators on this
63
74
column.
0 commit comments