Re: Multiple column index usage question

Поиск
Список
Период
Сортировка
От Ron Johnson
Тема Re: Multiple column index usage question
Дата
Msg-id 45B14CE6.1090501@cox.net
обсуждение исходный текст
Ответ на Multiple column index usage question  ("Jan Muszynski" <postgres@jancm.org>)
Ответы Re: Multiple column index usage question  ("Jeremy Haile" <jhaile@fastmail.fm>)
Список pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/19/07 15:53, Jan Muszynski wrote:
> Rather simple question, of which I'm not sure of the answer.
>
> If I have a multiple column index, say:
>     Index index1 on tableA (foo,bar)
>
> and I then:
>     Select * from "tableA" where foo = <some value>
>
> Will index1 be used, or am I looking at a seqscan in all circumstances?

Yes, it will use the index.

However, in earlier versions, the lvalue & rvalue needed to match in
type to use the index.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFsUzmS9HxQb37XmcRArY8AKDqzS5FeY1HwkSGeOlhQsjsdpAV5gCghiWj
R4e7rBWaAAGF25ZFhy1Elgc=
=Wkp8
-----END PGP SIGNATURE-----

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

Предыдущее
От: Russell Smith
Дата:
Сообщение: Re: [HACKERS] Autovacuum Improvements
Следующее
От: "Jeremy Haile"
Дата:
Сообщение: Re: Multiple column index usage question