+ linkend="xindex-strategies">). Depending on n, query may be
+ different type.
- bool consistent( bool check[], StrategyNumber n, Datum query)
+ bool consistent(bool check[], StrategyNumber n, Datum query)
Returns TRUE if the indexed value satisfies the query qualifier with
strategy n (or may satisfy in case of RECHECK mark in operator class).
Each element of the check array is TRUE if the indexed value has a
- corresponding key in the query: if (check[i] == TRUE ) the i-th key of
+ corresponding key in the query: if (check[i] == TRUE) the i-th key of
the query is present in the indexed value.
-
GIN tips and trics
+
GIN tips and tricks
Create vs insert
- In most cases, insertion into
GIN index is slow
+ In most cases, insertion into
a GIN index is slow
due to the likelihood of many keys being inserted for each value.
So, for bulk insertions into a table it is advisable to to drop the GIN
index and recreate it after finishing bulk insertion.
the whole result set, chosen at random.
- "Soft" means that the actual number of returned results could slightly
- differ from the specified limit, depending on the query and the quality
- of the system's random number generator.
+ Soft
means that the actual number of returned results
+ could slightly differ from the specified limit, depending on the query
+ and the quality of the system's random number generator.
GIN doesn't support full index scans due to their
- extremely inefficiency: because there are often many keys per value,
+ extreme inefficiency: because there are often many keys per value,
each heap pointer will returned several times.
- When
extractQuery returns zero keys, GIN will emit a
- error: for different opclasses and strategies the semantic meaning of a void
- query may be different (for example, any array contains the void array,
- but they don't overlap the void array), and
GIN can't
- suggest reasonable answer.
+ When extractQuery returns zero keys,
+
GIN will emit an error: for different opclasses and
+ strategies the semantic meaning of a void query may be different (for
+ example, any array contains the void array, but they don't overlap the
+
void array), and GIN can't suggest a reasonable answer.