pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Evan Carroll <lists@evancarroll.com>
To: pgsql-performance@postgresql.org
Subject: 8.2 Query 10 times slower than 8.1 (view-heavy)
Date: Tue, 28 Aug 2007 10:22:11 -0500
Message-ID: <428b865e0708280822u522391ecr5366bb5a6647f1aa@mail.gmail.com> (raw)

Dearest dragon hunters and mortal wanna-bes,

I recently upgraded a system from Apache2/mod_perl2 to
Lighttpd/fastcgi. The upgrade went about as rough as can be. While in
the midst of a bad day, I decided to make it worse, and upgrade Pg 8.1
to 8.2. Most people I talk to seem to think 8.1 was a lemon release;
not I. It worked excellent for me for the longest time, and I had no
good reason to upgrade it, other than to just have done so. In the
process, A query that took a matter of 2minutes, started taking hours.
I broke that query up into something more atomic and used it as a
sample.

The following material is provided for your assisting-me-pleasure: the
original SQL; the \ds for all pertinent views and tables; the output
of Explain Analyze; and the original query.

The original query both trials was: SELECT * FROM test_view where U_ID = 8;

test_view.sql =   http://rafb.net/p/HhT9g489.html

8.1_explain_analyze =  http://rafb.net/p/uIyY1s44.html
8.2_explain_analzye =  http://rafb.net/p/mxHWi340.html

\d table/views = http://rafb.net/p/EPnyB229.html

Yes, I ran vacuum full after loading both dbs.

Thanks again, ask and I will provide anything else. I'm on freenode,
in #postgresql, and can be found at all times with the nick
EvanCarroll.

-- 
Evan Carroll
System Lord of the Internets
me@evancarroll.com
832-445-8877



view thread (12+ messages)  latest in thread

Message-ID: <428b865e0708280822u522391ecr5366bb5a6647f1aa@mail.gmail.com>
Permalink:  ../428b865e0708280822u522391ecr5366bb5a6647f1aa@mail.gmail.com/
Also on:    postgresql.org/message-id/428b865e0708280822u522391ecr5366bb5a6647f1aa@mail.gmail.com

 · 

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@evancarroll.com
  Subject: Re: 8.2 Query 10 times slower than 8.1 (view-heavy)
  In-Reply-To: <428b865e0708280822u522391ecr5366bb5a6647f1aa@mail.gmail.com>

* 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