Re: index on numbers not honoured

Поиск
Список
Период
Сортировка
От Risko Peter
Тема Re: index on numbers not honoured
Дата
Msg-id Pine.LNX.4.21.0111160033050.1962-100000@pepehost.ris
обсуждение исходный текст
Ответ на index on numbers not honoured  ("Ilker Egilmez" <ilker@gate5.de>)
Ответы Re: index on numbers not honoured  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-general
On Thu, 15 Nov 2001, Ilker Egilmez wrote:
> hi risko,
> try to create your table, then create your index and then insert your values.
> this time the index will be used - very strange!
> ilker -)
I summed it:

show enable_seqscan;
show enable_indexscan;
drop index i;
drop table test;
create table test(a int4);
create index i on test(a);
copy test from stdin;
65
87
23
\.
explain select * from test where a=87;
drop index i;
explain select * from test where a=87;
create index i on test (a);
explain select * from test where a=87;

I experienced it too, first indexed, but then seqscan and seqscan again.
I think it is because the query optimizer. I advise you to control
manually in these cases the behavior of it by setting the enable_seqscan
variable (I often do it :).


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

Предыдущее
От: "Sunit Bhatia"
Дата:
Сообщение: Re: Database server crash ! URGENT !
Следующее
От: speedboy
Дата:
Сообщение: Re: Database server crash ! URGENT !