pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pierre-Frédéric Caillaud <lists@boutiquenumerique.com>
To: pgsql-performance@postgresql.org
Subject: Re: The usual sequential scan, but with LIMIT !
Date: Tue, 07 Sep 2004 16:30:54 +0200
Message-ID: <opsdynxsrqcq72hf@musicbox> (raw)
In-Reply-To: <29692.1094564867@sss.pgh.pa.us>
References: <4134BF36.3000504@syscor.com>
	<413BA104.1040508@geizhals.at>
	<b068057c040905181998476d1@mail.gmail.com>
	<opsdwm0iujcq72hf@musicbox>
	<14846.1094488841@sss.pgh.pa.us>
	<opsdx2os1ncq72hf@musicbox>
	<29692.1094564867@sss.pgh.pa.us>


	Yes, you're right as usual.
	I had not thought about playing with ORDER BY on a field which has only  
one value in the result set.


> If you write it as
> 	SELECT WHERE topic_id=2 ORDER BY topic_id DESC,id DESC.
> then an index on (topic_id, id) will work fine.  The mixed ASC/DESC
> ordering is not compatible with the index.




view thread (8+ messages)  latest in thread

Message-ID: <opsdynxsrqcq72hf@musicbox>
Permalink:  ../opsdynxsrqcq72hf@musicbox/
Also on:    postgresql.org/message-id/opsdynxsrqcq72hf@musicbox

 · 

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: lists@boutiquenumerique.com
  Subject: Re: The usual sequential scan, but with LIMIT !
  In-Reply-To: <opsdynxsrqcq72hf@musicbox>

* 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