Re: [GENERAL] Re: can't seem to use index

Поиск
Список
Период
Сортировка
От Frank Mandarino
Тема Re: [GENERAL] Re: can't seem to use index
Дата
Msg-id 00Jan11.124518est.115201@sky.risca.com
обсуждение исходный текст
Ответ на Re: [GENERAL] Re: can't seem to use index  (admin <admin@wtbwts.com>)
Список pgsql-general
On Tue, 11 Jan 2000, admin wrote:

> > > I'm trying to use an index on a varchar(32) field, but explain keeps
> > > retuning a sequential scan. This is my table and index:
> >
> > I had a similar problem last year when trying to use an index on a
> > char(8) field.  Two solutions worked for me:  1) use "bpchar_ops", and
> > 2) leave out the operator class altogether.
> >
> Thanks, it worked. After reading your previous message, I guess I will
> omit the operator class altogether considering postgresql will most likely
> make a better decision than me anyways.
>
> Furthermore, since you seem to be quite familiar with this project, are
> you aware of any documentation for fine tuning postgresql? For instance,
> how can I make an educated decition whether to use char(32) or
> varchar(32)? From the documentation, under /docs/user/datatype960.htm, all
> four character types are shown in a table but there's no explanation as to
> which would be preferable in certain situations. If using explain is the
> way to go, it returned a higher cost for a sequential scan on a char()
> field compared to a varchar() field. Unfortunately, I suspect using char()
> does have some advantages I don't know about.
>
> Maybe these are newbie preoccupations, but I suspect there are a few of us
> out there. For the moment, the best tips I've received came from this
> mailing list and maybe this is the way to go.
>
> Thanks again for the help,
> Marc
>

Marc,

I am happy to hear that the index is working, but I really can't take
any credit.  I was only passing on information that I gained from these
mailing lists because I was in a similar situation once and I greatly
appreciated the help provided by Herouth Maoz and Gene Selkov, Jr.

Also, I am not that familiar with this project, so I don't have any fine
tuning suggestions for you.  If you do find out any information about
the advantages of each of the character types, I'm sure it would be
useful to many subscribers of this list, including myself.

Regards,
../fam
--
Frank A. Mandarino
fam@risca.com


В списке pgsql-general по дате отправления:

Предыдущее
От: Sarah Officer
Дата:
Сообщение: views containing agregates questions
Следующее
От: Jeff Eckermann
Дата:
Сообщение: Memory leak in FreeBSD?