Re: 7.1.3 not using index

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 7.1.3 not using index
Дата
Msg-id 19191.1007413532@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: 7.1.3 not using index  (Daniel Kalchev <daniel@digsys.bg>)
Ответы Re: 7.1.3 not using index  (Daniel Kalchev <daniel@digsys.bg>)
Re: 7.1.3 not using index  (Daniel Kalchev <daniel@digsys.bg>)
Список pgsql-hackers
Daniel Kalchev <daniel@digsys.bg> writes:
>>> Do you get the same plan if you try to force an indexscan by doing
>>> set enable_seqscan to off;

> db=# set enable_seqscan to off;
> SET VARIABLE
> db=# explain select * from persons where personid = 1;
> NOTICE:  QUERY PLAN:

> Index Scan using persons_personid_idx on persons  (cost=0.00..nan rows=1 
> width=177)

Hmph.  The evidence so far suggests that you're getting a NaN cost
estimate for *any* indexscan, ie, the problem is somewhere in cost_index
or its subroutines.  That's a bit of a leap but it's consistent both
with your general complaint and these specific examples.

> I will rebuild it again, re-initdb and reload the whole database, but this 
> build was on vanilla BSD/OS 4.2 with the only modifications to add larger 
> shared memory support in the kernel (I need to run many backends).

I'd wonder more about your compiler than the kernel.  Keep in mind that
no one but you has reported anything like this ... so there's got to be
some fairly specific cause.

> PostgreSQL was build with these options

> ./configure  --enable-locale --with-perl --with-pythos --with-tcl 
> --enable-obdc --with-krb4 --with-openssl --enable-syslog 
> --with-includes=/usr/include/kerberosIV:/usr/contrib/include

> What I will do try to do now is to clean/rebuild/install everything again. 
> Then try to build with --enable-locale only.

Offhand I would not expect any of those options to affect anything
happening in the planner, at least not for integer column types.

Wild guess: what is configure producing for the ALIGN_xxx macros?
(look in src/include/config.h)  Does it match what you believe about
your hardware?
        regards, tom lane


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

Предыдущее
От: Daniel Kalchev
Дата:
Сообщение: Re: 7.1.3 not using index
Следующее
От: Manuel Sugawara
Дата:
Сообщение: Re: date formatting and tab-complete patch