Обсуждение: LIKE, ~ indexing documentation

Поиск
Список
Период
Сортировка

LIKE, ~ indexing documentation

От
Marc Howard Zuckman
Дата:
In a reply to Bruce, I suggested that the create_index man page
might be updated to mention the possible use of indices with
the LIKE, ~, and ~* operators.  I thought that the query used
to generated the table in the man page might be automatically
updated and thus done for 6.3, but probably not since the
matched string expression needs to be anchored.  Mention
of the possible use of indices in this circumstance might still be
included in create_index man page and possibly in the explain man page.

Probably the best place to put it would be in a tips section of the
user manual.  The tips section might include stuff like:
    a) running vacuum to optimize query plan
    b) when to use char/varchar/text
    c) using joins vs subselects

Suggestions are cheap, implementation takes work.  I'm very appreciative
of all that you have already done.

Marc Zuckman



Re: [HACKERS] LIKE, ~ indexing documentation

От
Bruce Momjian
Дата:
>
> In a reply to Bruce, I suggested that the create_index man page
> might be updated to mention the possible use of indices with
> the LIKE, ~, and ~* operators.  I thought that the query used
> to generated the table in the man page might be automatically
> updated and thus done for 6.3, but probably not since the
> matched string expression needs to be anchored.  Mention
> of the possible use of indices in this circumstance might still be
> included in create_index man page and possibly in the explain man page.
>
> Probably the best place to put it would be in a tips section of the
> user manual.  The tips section might include stuff like:
>     a) running vacuum to optimize query plan
>     b) when to use char/varchar/text
>     c) using joins vs subselects
>
> Suggestions are cheap, implementation takes work.  I'm very appreciative
> of all that you have already done.

Actually, the missing use of indexes for LIKE was a deficiency, not a
real special feature.  Everyone expected it to work and it didn't until
now.  Also, all commercial databases do this, but no special mention is
made if it in their manuals, that I have seen.  Perhaps we can added it
to the FAQ if people start asking about it more often.

--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)