From: | John Taylor <postgres(at)jtresponse(dot)co(dot)uk> |
---|---|
To: | "PgSQL Novice" <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: What gets inherited |
Date: | 2002-06-18 16:47:55 |
Message-ID: | 02061817475504.01632@splash.hq.jtresponse.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Tuesday 18 June 2002 16:45, I wrote:
> On Tuesday 18 June 2002 16:19, I wrote:
> > Hi,
> >
> > If I create a table that inherits from another, it inherits all the attributes,
> > but does not appear to inherit the constraints, or indexes
> >
>
> Just double checked.
> It seems that indexes DO get inherited, but I'm not sure about the rest.
> (I don't think I had enough rows for the optimizer to kick in indexed searches before)
>
Nope - thats not it....
john=# create index parent_value on parent(value);
CREATE
john=# explain select * from parent where value='foo';
NOTICE: QUERY PLAN:
Result (cost=0.00..30.64 rows=20 width=24)
-> Append (cost=0.00..30.64 rows=20 width=24)
-> Index Scan using parent_value on parent (cost=0.00..8.14 rows=10 width=24)
-> Seq Scan on child parent (cost=0.00..22.50 rows=10 width=24)
EXPLAIN
...
Now I'm really confused.
Can someone explain what is really going on !
Thanks
JohnT
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2002-06-18 17:54:59 | Re: function delete problems |
Previous Message | Pierre-Alexis PAQUIN | 2002-06-18 16:02:00 | unsubscribe NOVICE |