On Fri, Mar 2, 2012 at 5:12 AM, Tyler Durden wrote:
> Hi,
> I can't figure out why query planner doesn't use the proper index, anyone
> can help me?
>
> This query properly uses indexes:
>
> mydb=# EXPLAIN SELECT U0."object_id" FROM "activity_follow" U0 WHERE
> (U0."content_type_id" = 3 AND U0."us
http://explain.depesz.com/s/f92O
*EXPLAIN ANALYSE VERBOSE SELECT "activity_action"."id",
"activity_action"."actor_id", "activity_action"."verb",
"activity_action"."action_content_type_id",
"activity_action"."action_object_id",
"activity_action"."target_content_type_id",
"activity_action"."target_o
On 2 Březen 2012, 14:34, Tyler Durden wrote:
> On Fri, Mar 2, 2012 at 12:55 PM, Tomas Vondra wrote:
>
>> On 2 Březen 2012, 13:45, Tyler Durden wrote:
>> >>
>> > Yes, but if I remove *U0."user_id" = 1 *will use the index:
>>
>> Which PostgreSQL version is that? Post EXPLAIN ANALYZE output for all
>
On Fri, Mar 2, 2012 at 12:55 PM, Tomas Vondra wrote:
> On 2 Březen 2012, 13:45, Tyler Durden wrote:
> >>
> > Yes, but if I remove *U0."user_id" = 1 *will use the index:
>
> Which PostgreSQL version is that? Post EXPLAIN ANALYZE output for all
> three queries, not just EXPLAIN. And use explain.dep
On 2 Březen 2012, 13:45, Tyler Durden wrote:
>>
> Yes, but if I remove *U0."user_id" = 1 *will use the index:
Which PostgreSQL version is that? Post EXPLAIN ANALYZE output for all
three queries, not just EXPLAIN. And use explain.depesz.com if possible,
it's much more readable.
kind regards
Tomas
Hi,
On Fri, Mar 2, 2012 at 12:23 PM, Tomas Vondra wrote:
> Hi,
>
> On 2 Březen 2012, 13:12, Tyler Durden wrote:
> > Hi,
> > I can't figure out why query planner doesn't use the proper index, anyone
> > can help me?
> >
> > This query properly uses indexes:
> >
> > mydb=# EXPLAIN SELECT U0."objec
Hi,
On 2 Březen 2012, 13:12, Tyler Durden wrote:
> Hi,
> I can't figure out why query planner doesn't use the proper index, anyone
> can help me?
>
> This query properly uses indexes:
>
> mydb=# EXPLAIN SELECT U0."object_id" FROM "activity_follow" U0 WHERE
> (U0."content_type_id" = 3 AND U0."user_