Re: inheritance, and plans - Mailing list pgsql-performance

From Tom Lane
Subject Re: inheritance, and plans
Date
Msg-id 27713.1233957008@sss.pgh.pa.us
Whole thread Raw
In response to inheritance, and plans  (Grzegorz Jaśkiewicz <gryzman@gmail.com>)
Responses Re: inheritance, and plans  (Grzegorz Jaśkiewicz <gryzman@gmail.com>)
List pgsql-performance
=?UTF-8?Q?Grzegorz_Ja=C5=9Bkiewicz?= <gryzman@gmail.com> writes:
> so my question is, why isn't postgres use index on some tables , and
> search for the X > N individually ?

The UNION arms have to all be the same data type in order to have
restrictions pushed down through the UNION.  You did not show us
the table declarations for your first example, but I bet that updateid
isn't the same type in both.  (And yes, a domain is different from its
underlying type for this purpose.)

In the second example, "1" isn't even the right base type let alone
the same domain.

            regards, tom lane

pgsql-performance by date:

Previous
From: Greg Smith
Date:
Subject: Re: suggestions for postgresql setup on Dell 2950 , PERC6i controller
Next
From: Scott Carey
Date:
Subject: Re: suggestions for postgresql setup on Dell 2950 , PERC6i controller