Re: [PERFORM] planner index choice

2010-07-29 Thread Tom Lane
t...@fuzzy.cz writes: >> http://explain.depesz.com/s/br9 >> http://explain.depesz.com/s/gxH > Well, I don't have time to do a thorough analysis right now, but in all > the plans you've posted there are quite high values in the "Rows x" column > (e.g. the 5727.5 value). > That means a significant

Re: [PERFORM] planner index choice

2010-07-29 Thread tv
> http://explain.depesz.com/s/br9 > http://explain.depesz.com/s/gxH Well, I don't have time to do a thorough analysis right now, but in all the plans you've posted there are quite high values in the "Rows x" column (e.g. the 5727.5 value). That means a significant difference in estimated and actu

Re: [PERFORM] planner index choice

2010-07-29 Thread Chris
Hi, Hrm ... are you *certain* that's an 8.4 server? Yep. # psql -U postgres -d db psql (8.4.4) db=# select version(); version --

Re: [PERFORM] planner index choice

2010-07-28 Thread Tom Lane
Chris writes: > The query: > SELECT >assetid, custom_val > FROM >sq_ast_attr_val > WHERE >attrid IN (SELECT attrid FROM sq_ast_attr WHERE name = > 'is_contextable' AND (type_code = 'metadata_field_select' OR > owning_type_code = 'metadata_field')) >AND contextid = 0 > INTERSECT

[PERFORM] planner index choice

2010-07-28 Thread Chris
Hi there, I have a simple query where I don't understand the planner's choice to use a particular index. The main table looks like this: # \d sq_ast_attr_val Table "public.sq_ast_attr_val" Column| Type | Modifiers -+-