|
| 1 | +<!-- doc/src/sgml/vci.sgml --> |
| 2 | + |
| 3 | +<sect1 id="vci" xreflabel="vci"> |
| 4 | + <title>vci — Vertical Clustered Index</title> |
| 5 | + |
| 6 | + <indexterm zone="vci"> |
| 7 | + <primary>vci</primary> |
| 8 | + </indexterm> |
| 9 | + |
| 10 | + <para> |
| 11 | + <literal>vci</literal> provides a columnar store that is implemented using |
| 12 | + <productname>PostgreSQL</productname> index access methods (see <xref linkend="indexam"/>). |
| 13 | + All data can be stored in memory. |
| 14 | + </para> |
| 15 | + |
| 16 | + <para> |
| 17 | + This module must be loaded by adding <literal>vci</literal> to both |
| 18 | + <xref linkend="guc-shared-preload-libraries"/> and <xref linkend="guc-session-preload-libraries"/> |
| 19 | + in <filename>postgresql.conf</filename>, as it requires additional shared memory. |
| 20 | + A server restart is required to add or remove the module. |
| 21 | + </para> |
| 22 | + |
| 23 | + <sect2 id="vci-functions"> |
| 24 | + <title>Functions</title> |
| 25 | + |
| 26 | + <variablelist> |
| 27 | + <varlistentry> |
| 28 | + <term> |
| 29 | + <function>vci_runs_in_query() returns bool</function> |
| 30 | + <indexterm> |
| 31 | + <primary>vci_runs_in_query</primary> |
| 32 | + </indexterm> |
| 33 | + </term> |
| 34 | + |
| 35 | + <listitem> |
| 36 | + |
| 37 | + <para> |
| 38 | + Returns <literal>true</literal> if a VCI index and custom scan are used |
| 39 | + in the current query execution. This function is typically used to verify |
| 40 | + whether a query is processed using VCI. For example: |
| 41 | + |
| 42 | +<programlisting> |
| 43 | +SELECT vci_runs_in_query() AS vci_runs_in_query, key, count(*) FROM test_table; |
| 44 | +</programlisting> |
| 45 | + |
| 46 | + </para> |
| 47 | + </listitem> |
| 48 | + </varlistentry> |
| 49 | + </variablelist> |
| 50 | + </sect2> |
| 51 | + |
| 52 | + <sect2 id="vci-parameters"> |
| 53 | + <title>Parameters</title> |
| 54 | + <variablelist> |
| 55 | + |
| 56 | + <varlistentry id="guc-vci-cost-threshold" xreflabel="vci.cost_threshold"> |
| 57 | + <term> |
| 58 | + <varname>vci.cost_threshold</varname> (<type>integer</type>) |
| 59 | + <indexterm> |
| 60 | + <primary><varname>vci.cost_threshold</varname> configuration parameter</primary> |
| 61 | + </indexterm> |
| 62 | + </term> |
| 63 | + <listitem> |
| 64 | + <para> |
| 65 | + Specifies the CPU cost threshold beyond which the VCI control worker will |
| 66 | + stop running. |
| 67 | + </para> |
| 68 | + </listitem> |
| 69 | + </varlistentry> |
| 70 | + |
| 71 | + <varlistentry id="guc-vci-log-query" xreflabel="vci.log_query"> |
| 72 | + <term> |
| 73 | + <varname>vci.log_query</varname> (<type>boolean</type>) |
| 74 | + <indexterm> |
| 75 | + <primary><varname>vci.log_query</varname> configuration parameter</primary> |
| 76 | + </indexterm> |
| 77 | + </term> |
| 78 | + <listitem> |
| 79 | + <para> |
| 80 | + Logs a message when a query cannot be executed using VCI. |
| 81 | + </para> |
| 82 | + </listitem> |
| 83 | + </varlistentry> |
| 84 | + |
| 85 | + <varlistentry id="guc-vci-maintenance-work-mem" xreflabel="vci.maintenance_work_mem"> |
| 86 | + <term> |
| 87 | + <varname>vci.maintenance_work_mem</varname> (<type>integer</type>) |
| 88 | + <indexterm> |
| 89 | + <primary><varname>vci.maintenance_work_mem</varname> configuration parameter</primary> |
| 90 | + </indexterm> |
| 91 | + </term> |
| 92 | + <listitem> |
| 93 | + <para> |
| 94 | + Specifies the maximum amount of memory that can be used by each VCI control |
| 95 | + worker during maintenance operations. |
| 96 | + </para> |
| 97 | + </listitem> |
| 98 | + </varlistentry> |
| 99 | + |
| 100 | + </variablelist> |
| 101 | + <para> |
| 102 | + TBD. There are many more parameters which are not yet documented. |
| 103 | + </para> |
| 104 | + </sect2> |
| 105 | + |
| 106 | + <sect2 id="vci-examples"> |
| 107 | + <title>Examples</title> |
| 108 | + <para> |
| 109 | + TBD. Add examples here. |
| 110 | + </para> |
| 111 | + </sect2> |
| 112 | + |
| 113 | + <sect2 id="vci-limitations"> |
| 114 | + <title>Limitations</title> |
| 115 | + <para> |
| 116 | + <itemizedlist> |
| 117 | + <listitem> |
| 118 | + <para> |
| 119 | + Currently, only a limited set of data types is supported for indexing with VCI. |
| 120 | + </para> |
| 121 | + </listitem> |
| 122 | + <listitem> |
| 123 | + <para> |
| 124 | + This extension does not support the <command>ALTER EXTENSION UPDATE</command> command. |
| 125 | + </para> |
| 126 | + </listitem> |
| 127 | + <listitem> |
| 128 | + <para> |
| 129 | + The command <command>ALTER INDEX</command> cannot be used for VCI indexes. |
| 130 | + </para> |
| 131 | + </listitem> |
| 132 | + <listitem> |
| 133 | + <para> |
| 134 | + VCI indexes cannot be used with the <command>CLUSTER</command> command. |
| 135 | + </para> |
| 136 | + </listitem> |
| 137 | + </itemizedlist> |
| 138 | + </para> |
| 139 | + </sect2> |
| 140 | + |
| 141 | + |
| 142 | + <sect2 id="vci-authors"> |
| 143 | + <title>Authors</title> |
| 144 | + <para> |
| 145 | + Aya Iwata <email> [email protected]</email>, |
| 146 | + Fujitsu Limited, Kanagawa, Japan |
| 147 | + </para> |
| 148 | + </sect2> |
| 149 | + |
| 150 | +</sect1> |
0 commit comments