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

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 (view raw or flat)
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

pgsql-performance by date

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

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