pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Sebastjan Trepca <trepca@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Problems with ordering (can't force query planner to use an index)
Date: Tue, 03 Mar 2009 16:27:05 -0500
Message-ID: <17008.1236115625@sss.pgh.pa.us> (raw)
In-Reply-To: <cd329af80903031105o754b328aid9c1ecdd60b44278@mail.gmail.com>
References: <cd329af80903030905y2efa15bdt123779ee8877df4a@mail.gmail.com>
	<603c8f070903030912t36c541ebr50b4576c7a9a5b65@mail.gmail.com>
	<cd329af80903030920x7ccb7b10l7a279a464cab5bd4@mail.gmail.com>
	<603c8f070903030940n3fb1e9eay53666d06cf489469@mail.gmail.com>
	<cd329af80903031105o754b328aid9c1ecdd60b44278@mail.gmail.com>

Sebastjan Trepca <trepca@gmail.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




view thread (10+ messages)

Message-ID: <17008.1236115625@sss.pgh.pa.us>
Permalink:  ../17008.1236115625@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/17008.1236115625@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, trepca@gmail.com, robertmhaas@gmail.com
  Subject: Re: Problems with ordering (can't force query planner to use an index)
  In-Reply-To: <17008.1236115625@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox