Skip site navigation (1) Skip section navigation (2)

postgresql bug?

From: uwcssa <uwcssa(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: postgresql bug?
Date: 2006-02-05 05:06:55
Message-ID: f2f562510602042106y7d82b3f8h28c9b75b362e3d05@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
i am using version 8.0.3

if you run the following query:

select count(*) from T1 where  (T1.a>10 and T1.a<20) or (T1.a>90 and T1.a
<100)

the set_baserel_size_estimate will accurately estimate the selectivity on
T1.

However, if you run

select count(*) from T1, T2 where T1.b=T2.c and  (T1.a>10 and T1.a<20) or (
T1.a>90 and T1.a<100)

the selectivity estimate on T1 is always 1.0     the reason is the
re-l->baserestrictinfo is NULL for the second query in
set_baserel_size_estimates().

is this a bug?

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2006-02-05 05:19:16
Subject: Re: postgresql bug?
Previous:From: Neil ConwayDate: 2006-02-05 02:21:27
Subject: Re: look up tables while parsing queries

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group