Re: Not using index

Поиск
Список
Период
Сортировка
От Joerg Hessdoerfer
Тема Re: Not using index
Дата
Msg-id 5.0.2.1.0.20010207162844.00a84970@192.168.0.1
обсуждение исходный текст
Ответ на Not using index  (Crispin Miller <crispin@cs.man.ac.uk>)
Список pgsql-general
At 14:47 07.02.01 +0000, you wrote:
>Hi,
>I have a table with about 8million tuples in it. I need to do a search
>on two of the table's columns, so I've created a couple of indices, one
>for each column.
>Then I've run VACUUM ANALYZE. The query planner still wants to do a
>sequential scan on the database. Any idea where I'm going wrong?
>Crispin

For this, you need to create an index on BOTH columns, e.g.

'create index foo on bar ( baz, bang )'

That should help.

Greetings,
         Joerg


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

Предыдущее
От: Brice Ruth
Дата:
Сообщение: Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference?
Следующее
От: Gunnar R|nning
Дата:
Сообщение: Re: full text searching