63.2. Встроенные классы операторов
В базовый дистрибутив PostgreSQL включены классы операторов SP-GiST, перечисленные в Таблице 63.1.
Таблица 63.1. Встроенные классы операторов SP-GiST
Имя | Индексируемый тип данных | Индексируемые операторы |
---|---|---|
kd_point_ops | point | << <@ <^ >> >^ ~= |
quad_point_ops | point | << <@ <^ >> >^ ~= |
range_ops | любой тип диапазона | && &< &> -|- << <@ = >> @> |
box_ops | box | << &< && &> >> ~= @> <@ &<| <<| |>> |&> |
text_ops | text | < <= = > >= ~<=~ ~<~ ~>=~ ~>~ |
inet_ops | inet , cidr | && >> >>= > >= <> << <<= < <= = |
Из двух классов операторов для типа point
классом по умолчанию является quad_point_ops
. Класс kd_point_ops
поддерживает те же операторы, но использует другую структуру данных индекса, которая может дать выигрыш в скорости для некоторых приложений.
63.2. Built-in Operator Classes
The core PostgreSQL distribution includes the SP-GiST operator classes shown in Table 63.1.
Table 63.1. Built-in SP-GiST Operator Classes
Name | Indexed Data Type | Indexable Operators |
---|---|---|
kd_point_ops | point | << <@ <^ >> >^ ~= |
quad_point_ops | point | << <@ <^ >> >^ ~= |
range_ops | any range type | && &< &> -|- << <@ = >> @> |
box_ops | box | << &< && &> >> ~= @> <@ &<| <<| |>> |&> |
text_ops | text | < <= = > >= ~<=~ ~<~ ~>=~ ~>~ |
inet_ops | inet , cidr | && >> >>= > >= <> << <<= < <= = |
Of the two operator classes for type point
, quad_point_ops
is the default. kd_point_ops
supports the same operators but uses a different index data structure that may offer better performance in some applications.