pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jonathan <jonathan@kc8onw.net>
To: pgsql-performance@postgresql.org
To: jturmel@gmail.com
Subject: Re: Query got slow from 9.0 to 9.1 upgrade
Date: Thu, 03 May 2012 09:05:29 -0400
Message-ID: <4FA28299.1080805@kc8onw.net> (raw)
In-Reply-To: <A0211EA5A93846FE9F6504F8676905ED@gmail.com>
References: <A0211EA5A93846FE9F6504F8676905ED@gmail.com>

On 4/30/2012 5:17 PM, Josh Turmel wrote:
> We just upgraded from 9.0 to 9.1, we're using the same server
> configuration, that has been confirmed 3 or 4 times over. Any help would
> be appreciated. If I remove the "ORDER BY" it gets fast again because it
> goes back to using the user_id index, if I remove the LIMIT/OFFSET it
> gets fast again, obviously I need both of those, but that was just to
> test and see what would happen.

I had this problem as well and ended up working around it by having the
application cache the highest seen user_id and send that back to the
server which uses it in a where clause.  This way I had just the LIMIT
and was able to remove the OFFSET and things ran great.  I don't know
how feasible it is for you to change things application side but it
worked well for me.

Jonathan




view thread (4+ messages)  latest in thread

Message-ID: <4FA28299.1080805@kc8onw.net>
Permalink:  ../4FA28299.1080805@kc8onw.net/
Also on:    postgresql.org/message-id/4FA28299.1080805@kc8onw.net

 · 

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: jonathan@kc8onw.net, jturmel@gmail.com
  Subject: Re: Query got slow from 9.0 to 9.1 upgrade
  In-Reply-To: <4FA28299.1080805@kc8onw.net>

* 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