Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
7259cc1e
Commit
7259cc1e
authored
Jan 18, 2006
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify use of btree indexes for ILIKE and ~*.
parent
ccebb674
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
doc/src/sgml/indices.sgml
doc/src/sgml/indices.sgml
+14
-10
No files found.
doc/src/sgml/indices.sgml
View file @
7259cc1e
<!-- $PostgreSQL: pgsql/doc/src/sgml/indices.sgml,v 1.5
5 2005/11/07 17:36:44 tgl
Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/indices.sgml,v 1.5
6 2006/01/18 21:29:45 momjian
Exp $ -->
<chapter id="indexes">
<title id="indexes-title">Indexes</title>
...
...
@@ -141,17 +141,21 @@ CREATE INDEX test1_id_index ON test1 (id);
<para>
The optimizer can also use a B-tree index for queries involving the
pattern matching operators <literal>LIKE</>,
<literal>ILIKE</literal>, <literal>~</literal>, and
<literal>~*</literal>, <emphasis>if</emphasis> the pattern is a constant
and is anchored to the beginning of the string — for example,
<literal>col LIKE 'foo%'</literal> or <literal>col ~ '^foo'</literal>,
but not <literal>col LIKE '%bar'</literal>. However, if your server does
not use the C locale you will need to create the index with a
special operator class to support indexing of pattern-matching queries.
See <xref linkend="indexes-opclass"> below.
pattern matching operators <literal>LIKE</> and <literal>~</literal>
<emphasis>if</emphasis> the pattern is a constant and is anchored to
the beginning of the string — for example, <literal>col LIKE
'foo%'</literal> or <literal>col ~ '^foo'</literal>, but not
<literal>col LIKE '%bar'</literal>. However, if your server does not
use the C locale you will need to create the index with a special
operator class to support indexing of pattern-matching queries. See
<xref linkend="indexes-opclass"> below. It is also possible to use
B-tree indexes for <literal>ILIKE</literal> and
<literal>~*</literal>, but only if the pattern starts with
non-alphabetic characters, i.e. characters that are not affected by
upper/lower case conversion.
</para>
<para>
<indexterm>
<primary>index</primary>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment