Skip to content

Commit

Permalink
Improve docs pages to have information about indexes for Row Level Ge…
Browse files Browse the repository at this point in the history
…o Partitioning. (yugabyte#11959)

This fix to docs contains the following changes:
1. Change CREATE INDEX grammar to include details about tablespaces.
2. Change CREATE TABLE grammer to include details about tablespaces.
3. Add examples about creating indexes for partitioned tables in Table
   Partitioning pages.
4. Add examples for creating indexes with tablespaces in Row Level Geo
   Partitioning.
5. Add a brief section about Duplicate Indexes in Tablespaces page.
6. Make a fix for the Tablespaces page from https://phabricator.dev.yugabyte.com/D14076
7. Update some outdated comments in the Table Partitioning page w.r.t
   Tablespace inheritance.
8. Reflect changes in stable, 2.6 and 2.8 versions as well
  • Loading branch information
deeps1991 authored Apr 13, 2022
1 parent cfe5beb commit f652ab4
Show file tree
Hide file tree
Showing 223 changed files with 1,502 additions and 1,036 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#### create_index

<svg class="rrdiagram" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="586" height="325" viewbox="0 0 586 325"><path class="connector" d="M0 22h15m67 0h30m69 0h20m-104 0q5 0 5 5v8q0 5 5 5h79q5 0 5-5v-8q0-5 5-5m5 0h10m59 0h30m144 0h20m-179 0q5 0 5 5v8q0 5 5 5h154q5 0 5-5v-8q0-5 5-5m5 0h7m2 0h2m2 0h2m-479 50h2m2 0h2m2 0h47m32 0h10m45 0h10m64 0h20m-196 0q5 0 5 5v8q0 5 5 5h171q5 0 5-5v-8q0-5 5-5m5 0h10m54 0h20m-300 0q5 0 5 5v23q0 5 5 5h275q5 0 5-5v-23q0-5 5-5m5 0h10m38 0h30m52 0h20m-87 0q5 0 5 5v8q0 5 5 5h62q5 0 5-5v-8q0-5 5-5m5 0h10m91 0h7m2 0h2m2 0h2m-586 95h2m2 0h2m2 0h27m60 0h10m154 0h20m-259 0q5 0 5 5v8q0 5 5 5h234q5 0 5-5v-8q0-5 5-5m5 0h10m25 0h30m-5 0q-5 0-5-5v-20q0-5 5-5h37m24 0h38q5 0 5 5v20q0 5-5 5m-5 0h30m25 0h7m2 0h2m2 0h2m-503 80h2m2 0h2m2 0h27m75 0h10m25 0h30m-5 0q-5 0-5-5v-20q0-5 5-5h46m24 0h46q5 0 5 5v20q0 5-5 5m-5 0h30m25 0h20m-336 0q5 0 5 5v8q0 5 5 5h311q5 0 5-5v-8q0-5 5-5m5 0h7m2 0h2m2 0h2m-371 50h2m2 0h2m2 0h27m65 0h10m137 0h20m-247 0q5 0 5 5v8q0 5 5 5h222q5 0 5-5v-8q0-5 5-5m5 0h15"/><polygon points="0,29 5,22 0,15" style="fill:black;stroke-width:0"/><rect class="literal" x="15" y="5" width="67" height="25" rx="7"/><text class="text" x="25" y="22">CREATE</text><rect class="literal" x="112" y="5" width="69" height="25" rx="7"/><text class="text" x="122" y="22">UNIQUE</text><rect class="literal" x="211" y="5" width="59" height="25" rx="7"/><text class="text" x="221" y="22">INDEX</text><rect class="literal" x="300" y="5" width="144" height="25" rx="7"/><text class="text" x="310" y="22">NONCONCURRENTLY</text><rect class="literal" x="55" y="55" width="32" height="25" rx="7"/><text class="text" x="65" y="72">IF</text><rect class="literal" x="97" y="55" width="45" height="25" rx="7"/><text class="text" x="107" y="72">NOT</text><rect class="literal" x="152" y="55" width="64" height="25" rx="7"/><text class="text" x="162" y="72">EXISTS</text><a xlink:href="../../../syntax_resources/grammar_diagrams#name"><rect class="rule" x="246" y="55" width="54" height="25"/><text class="text" x="256" y="72">name</text></a><rect class="literal" x="330" y="55" width="38" height="25" rx="7"/><text class="text" x="340" y="72">ON</text><rect class="literal" x="398" y="55" width="52" height="25" rx="7"/><text class="text" x="408" y="72">ONLY</text><a xlink:href="../../../syntax_resources/grammar_diagrams#table-name"><rect class="rule" x="480" y="55" width="91" height="25"/><text class="text" x="490" y="72">table_name</text></a><rect class="literal" x="35" y="150" width="60" height="25" rx="7"/><text class="text" x="45" y="167">USING</text><a xlink:href="../../../syntax_resources/grammar_diagrams#access-method-name"><rect class="rule" x="105" y="150" width="154" height="25"/><text class="text" x="115" y="167">access_method_name</text></a><rect class="literal" x="289" y="150" width="25" height="25" rx="7"/><text class="text" x="299" y="167">(</text><rect class="literal" x="376" y="120" width="24" height="25" rx="7"/><text class="text" x="386" y="137">,</text><a xlink:href="#index-elem"><rect class="rule" x="344" y="150" width="89" height="25"/><text class="text" x="354" y="167">index_elem</text></a><rect class="literal" x="463" y="150" width="25" height="25" rx="7"/><text class="text" x="473" y="167">)</text><rect class="literal" x="35" y="230" width="75" height="25" rx="7"/><text class="text" x="45" y="247">INCLUDE</text><rect class="literal" x="120" y="230" width="25" height="25" rx="7"/><text class="text" x="130" y="247">(</text><rect class="literal" x="216" y="200" width="24" height="25" rx="7"/><text class="text" x="226" y="217">,</text><a xlink:href="../../../syntax_resources/grammar_diagrams#column-name"><rect class="rule" x="175" y="230" width="106" height="25"/><text class="text" x="185" y="247">column_name</text></a><rect class="literal" x="311" y="230" width="25" height="25" rx="7"/><text class="text" x="321" y="247">)</text><rect class="literal" x="35" y="280" width="65" height="25" rx="7"/><text class="text" x="45" y="297">WHERE</text><a xlink:href="../../../syntax_resources/grammar_diagrams#boolean-expression"><rect class="rule" x="110" y="280" width="137" height="25"/><text class="text" x="120" y="297">boolean_expression</text></a><polygon points="278,304 282,304 282,290 278,290" style="fill:black;stroke-width:0"/></svg>
<svg class="rrdiagram" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="586" height="375" viewbox="0 0 586 375"><path class="connector" d="M0 22h15m67 0h30m69 0h20m-104 0q5 0 5 5v8q0 5 5 5h79q5 0 5-5v-8q0-5 5-5m5 0h10m59 0h30m144 0h20m-179 0q5 0 5 5v8q0 5 5 5h154q5 0 5-5v-8q0-5 5-5m5 0h7m2 0h2m2 0h2m-479 50h2m2 0h2m2 0h47m32 0h10m45 0h10m64 0h20m-196 0q5 0 5 5v8q0 5 5 5h171q5 0 5-5v-8q0-5 5-5m5 0h10m54 0h20m-300 0q5 0 5 5v23q0 5 5 5h275q5 0 5-5v-23q0-5 5-5m5 0h10m38 0h30m52 0h20m-87 0q5 0 5 5v8q0 5 5 5h62q5 0 5-5v-8q0-5 5-5m5 0h10m91 0h7m2 0h2m2 0h2m-586 95h2m2 0h2m2 0h27m60 0h10m154 0h20m-259 0q5 0 5 5v8q0 5 5 5h234q5 0 5-5v-8q0-5 5-5m5 0h10m25 0h30m-5 0q-5 0-5-5v-20q0-5 5-5h37m24 0h38q5 0 5 5v20q0 5-5 5m-5 0h30m25 0h7m2 0h2m2 0h2m-503 80h2m2 0h2m2 0h27m75 0h10m25 0h30m-5 0q-5 0-5-5v-20q0-5 5-5h46m24 0h46q5 0 5 5v20q0 5-5 5m-5 0h30m25 0h20m-336 0q5 0 5 5v8q0 5 5 5h311q5 0 5-5v-8q0-5 5-5m5 0h7m2 0h2m2 0h2m-371 50h2m2 0h2m2 0h27m97 0h10m124 0h20m-266 0q5 0 5 5v8q0 5 5 5h241q5 0 5-5v-8q0-5 5-5m5 0h7m2 0h2m2 0h2m-301 50h2m2 0h2m2 0h27m65 0h10m137 0h20m-247 0q5 0 5 5v8q0 5 5 5h222q5 0 5-5v-8q0-5 5-5m5 0h15"/><polygon points="0,29 5,22 0,15" style="fill:black;stroke-width:0"/><rect class="literal" x="15" y="5" width="67" height="25" rx="7"/><text class="text" x="25" y="22">CREATE</text><rect class="literal" x="112" y="5" width="69" height="25" rx="7"/><text class="text" x="122" y="22">UNIQUE</text><rect class="literal" x="211" y="5" width="59" height="25" rx="7"/><text class="text" x="221" y="22">INDEX</text><rect class="literal" x="300" y="5" width="144" height="25" rx="7"/><text class="text" x="310" y="22">NONCONCURRENTLY</text><rect class="literal" x="55" y="55" width="32" height="25" rx="7"/><text class="text" x="65" y="72">IF</text><rect class="literal" x="97" y="55" width="45" height="25" rx="7"/><text class="text" x="107" y="72">NOT</text><rect class="literal" x="152" y="55" width="64" height="25" rx="7"/><text class="text" x="162" y="72">EXISTS</text><a xlink:href="../../../syntax_resources/grammar_diagrams#name"><rect class="rule" x="246" y="55" width="54" height="25"/><text class="text" x="256" y="72">name</text></a><rect class="literal" x="330" y="55" width="38" height="25" rx="7"/><text class="text" x="340" y="72">ON</text><rect class="literal" x="398" y="55" width="52" height="25" rx="7"/><text class="text" x="408" y="72">ONLY</text><a xlink:href="../../../syntax_resources/grammar_diagrams#table-name"><rect class="rule" x="480" y="55" width="91" height="25"/><text class="text" x="490" y="72">table_name</text></a><rect class="literal" x="35" y="150" width="60" height="25" rx="7"/><text class="text" x="45" y="167">USING</text><a xlink:href="../../../syntax_resources/grammar_diagrams#access-method-name"><rect class="rule" x="105" y="150" width="154" height="25"/><text class="text" x="115" y="167">access_method_name</text></a><rect class="literal" x="289" y="150" width="25" height="25" rx="7"/><text class="text" x="299" y="167">(</text><rect class="literal" x="376" y="120" width="24" height="25" rx="7"/><text class="text" x="386" y="137">,</text><a xlink:href="#index-elem"><rect class="rule" x="344" y="150" width="89" height="25"/><text class="text" x="354" y="167">index_elem</text></a><rect class="literal" x="463" y="150" width="25" height="25" rx="7"/><text class="text" x="473" y="167">)</text><rect class="literal" x="35" y="230" width="75" height="25" rx="7"/><text class="text" x="45" y="247">INCLUDE</text><rect class="literal" x="120" y="230" width="25" height="25" rx="7"/><text class="text" x="130" y="247">(</text><rect class="literal" x="216" y="200" width="24" height="25" rx="7"/><text class="text" x="226" y="217">,</text><a xlink:href="../../../syntax_resources/grammar_diagrams#column-name"><rect class="rule" x="175" y="230" width="106" height="25"/><text class="text" x="185" y="247">column_name</text></a><rect class="literal" x="311" y="230" width="25" height="25" rx="7"/><text class="text" x="321" y="247">)</text><rect class="literal" x="35" y="280" width="97" height="25" rx="7"/><text class="text" x="45" y="297">TABLESPACE</text><a xlink:href="../../../syntax_resources/grammar_diagrams#tablespace-name"><rect class="rule" x="142" y="280" width="124" height="25"/><text class="text" x="152" y="297">tablespace_name</text></a><rect class="literal" x="35" y="330" width="65" height="25" rx="7"/><text class="text" x="45" y="347">WHERE</text><a xlink:href="../../../syntax_resources/grammar_diagrams#boolean-expression"><rect class="rule" x="110" y="330" width="137" height="25"/><text class="text" x="120" y="347">boolean_expression</text></a><polygon points="278,354 282,354 282,340 278,340" style="fill:black;stroke-width:0"/></svg>

#### index_elem

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ create_index ::= CREATE [ UNIQUE ] INDEX [ NONCONCURRENTLY ]
[ [ IF NOT EXISTS ] name ] ON [ ONLY ] table_name
[ USING access_method_name ] ( index_elem [ , ... ] )
[ INCLUDE ( column_name [ , ... ] ) ]
[ TABLESPACE tablespace_name ]
[ WHERE boolean_expression ]
index_elem ::= { column_name | ( expression ) }
Expand Down
Loading

0 comments on commit f652ab4

Please sign in to comment.