Re: misbehaving planer? - Mailing list pgsql-hackers

From Zeugswetter Andreas ADI SD
Subject Re: misbehaving planer?
Date
Msg-id E1539E0ED7043848906A8FF995BDA57901726426@m0143.s-mxs.net
Whole thread Raw
In response to misbehaving planer?  (Darcy Buskermolen <darcyb@commandprompt.com>)
List pgsql-hackers
> db=#  \d s_ps.tbl_ps_type_1
>                                  Table "s_ps.tbl_ps_type_1"
...
> Check constraints:
>     "tbl_ps_typ_1_type_check" CHECK (type = 1)
> Inherits: tbl_ps
...
> myyearbook=# EXPLAIN ANALYZE SELECT uid FROM tbl_ps WHERE
> type = 1 and
> normalized_text='bush';
>
>
>
> QUERY PLAN
...
>          ->  Index Scan using index_b_on_type_2 on
> tbl_ps_type_2 tbl_ps
> (cost=0.00..4.53 rows=1 width=4) (actual time=0.099..0.099
> rows=0 loops=1)
>                Index Cond: ((normalized_text)::text = 'bush'::text)
>                Filter: (type = 1)

Do you have corresponding constraints on all other table partitions ?

btw. I doubt that the many partial indexes are really helpful here.
What you are doing basically only replaces one btree header page.

Andreas


pgsql-hackers by date:

Previous
From: Darcy Buskermolen
Date:
Subject: misbehaving planer?
Next
From: Tom Lane
Date:
Subject: Re: misbehaving planer?