Re: indices - used by which user ?

Поиск
Список
Период
Сортировка
От
Тема Re: indices - used by which user ?
Дата
Msg-id 14541.213.33.72.146.1052382848.squirrel@webmail.inode.at
обсуждение исходный текст
Ответ на Re: indices - used by which user ?  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-general
After investigating further, I found out, that the index will also be not
used if I do a psql -U postgres <database>, unless I issue a \c command,
in fact even \c - does it.

The other thing I found out: the joined colums are of type character
varying(10) and text, in this case the index (of the table having the text
column) will be used (after the \c trick), I have similiar other
databases, where both joined columns have the same type (character
varying(10)) and the index is never ever used, which does'nt make sense to
me.
Don't ask me wy the types are different, might be due to a dump/reload
during several upgrades.
Fact is, that the runtime of the query in the other (those having equal
types) databases  is about as fast as in the one with different types when
using indices.
But why does joining columns with different types use indices, whereas
equal type joins do not use indices.


Gerhard


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

Предыдущее
От:
Дата:
Сообщение: Re: indices - used by which user ?
Следующее
От: Manfred Koizar
Дата:
Сообщение: Re: indices - used by which user ?