Re: Problems with ordering (can't force query planner to use an index)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sebastjan Trepca <trepca(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Problems with ordering (can't force query planner to use an index)
Date: 2009-03-03 21:27:05
Message-ID: 17008.1236115625@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Sebastjan Trepca <trepca(at)gmail(dot)com> writes:
> It thinks there are even less rows in the set:

> -> Index Scan using core_accessor_fresh_idx on
> core_accessor (cost=0.00..8955.44 rows=2440 width=92) (actual
> time=0.056..53.107 rows=69312 loops=1)
> Index Cond: ((slot_id = 472) AND (slot_type_id =
> 119) AND (label = ''::text) AND (user_id = 0) AND (role = 0) AND
> (publish_state >= 60))

Maybe you should get rid of this six-column index, if you'd rather the
query didn't use it. It seems a tad overspecialized anyway.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2009-03-03 22:34:12 Re: Postgres 8.3, four times slower queries?
Previous Message Robert Haas 2009-03-03 20:27:12 Re: Problems with ordering (can't force query planner to use an index)