> 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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to