Re: 7.1.3 not using index

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Daniel Kalchev <daniel(at)digsys(dot)bg>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: 7.1.3 not using index
Date: 2001-12-03 21:05:32
Message-ID: 19191.1007413532@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Daniel Kalchev <daniel(at)digsys(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-12-03 21:17:42 Re: date formatting and tab-complete patch
Previous Message Manuel Sugawara 2001-12-03 21:04:36 Re: date formatting and tab-complete patch