Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
7259cc1e
Commit
7259cc1e
authored
19 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
Clarify use of btree indexes for ILIKE and ~*.
parent
ccebb674
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/src/sgml/indices.sgml
+14
-10
14 additions, 10 deletions
doc/src/sgml/indices.sgml
with
14 additions
and
10 deletions
doc/src/sgml/indices.sgml
+
14
−
10
View file @
7259cc1e
<!-- $PostgreSQL: pgsql/doc/src/sgml/indices.sgml,v 1.5
5
200
5/11/07 17:36:44 tgl
Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/indices.sgml,v 1.5
6
200
6/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>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment