Re: inheritance, and plans

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: inheritance, and plans
Date: 2009-02-06 21:50:08
Message-ID: 27713.1233957008@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

=?UTF-8?Q?Grzegorz_Ja=C5=9Bkiewicz?= <gryzman(at)gmail(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Carey 2009-02-07 00:10:39 Re: suggestions for postgresql setup on Dell 2950 , PERC6i controller
Previous Message Greg Smith 2009-02-06 18:49:21 Re: suggestions for postgresql setup on Dell 2950 , PERC6i controller