pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Kaijiang Chen <chenkaijiang@gmail.com>
Cc: Jeff Janes <jeff.janes@gmail.com>
Cc: Pg Bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #14302: SQL with LIMIT degrades performance seriously
Date: Wed, 31 Aug 2016 06:01:39 +0100
Message-ID: <87zint4joz.fsf@news-spur.riddles.org.uk> (raw)
In-Reply-To: <CAAkGvS8HTQ6mSNiRF4U5w8o_=PvL34tdsBp3kY6GLRrQit0WFQ@mail.gmail.com>
References: <20160830064858.15676.40929@wrigleys.postgresql.org>
	<CAMkU=1wpGXHZNJPA7XP711yDYMaHfDxtQgP-1wGSLuhD8Gmv3g@mail.gmail.com>
	<CAAkGvS8HTQ6mSNiRF4U5w8o_=PvL34tdsBp3kY6GLRrQit0WFQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

>>>>> "Kaijiang" == Kaijiang Chen <chenkaijiang@gmail.com> writes:

 Kaijiang> Thank you very much for your quick response!

 Kaijiang> So I know I have to deal with my own solutions. Fortunately,
 Kaijiang> I got the solution with the "WITH" clause:

Why not just create the correct index on each partition?  (parent_id,user_id)

-- 
Andrew (irc:RhodiumToad)


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (10+ messages)  latest in thread

Message-ID: <87zint4joz.fsf@news-spur.riddles.org.uk>
Permalink:  ../87zint4joz.fsf@news-spur.riddles.org.uk/
Also on:    postgresql.org/message-id/87zint4joz.fsf@news-spur.riddles.org.uk

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: andrew@tao11.riddles.org.uk, chenkaijiang@gmail.com, jeff.janes@gmail.com
  Subject: Re: BUG #14302: SQL with LIMIT degrades performance seriously
  In-Reply-To: <87zint4joz.fsf@news-spur.riddles.org.uk>
  References: <20160830064858.15676.40929@wrigleys.postgresql.org> <CAMkU=1wpGXHZNJPA7XP711yDYMaHfDxtQgP-1wGSLuhD8Gmv3g@mail.gmail.com> <CAAkGvS8HTQ6mSNiRF4U5w8o_=PvL34tdsBp3kY6GLRrQit0WFQ@mail.gmail.com> <87zint4joz.fsf@news-spur.riddles.org.uk>

* 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