From: Rafael Martinez <r.m.guerrero@usit.uio.no>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: SQL statement over 500% slower with 9.2 compared with 9.1
Date: Wed, 04 Sep 2013 08:49:35 +0200
Message-ID: <5226D7FF.7020000@usit.uio.no> (raw)
In-Reply-To: <17619.1377716890@sss.pgh.pa.us>
References: <521B4B2A.5010800@usit.uio.no>
<17619.1377716890@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 08/28/2013 09:08 PM, Tom Lane wrote:
[..........]
>
> If you don't want to do any major rewriting, you could probably
> stick an OFFSET 0 into the outer EXISTS sub-select (and/or the
> inner one) to get something similar to the 9.1 plan.
>
Thank you for your help.
Using OFFSET 0 in
SELECT *
FROM FilmParticipation C
WHERE C.partType = 'cast'
AND C.filmId = D.filmId
AND C.personId = D.personId
OFFSET 0
give us a result similar to 9.1.
This SQL is used as an example in one of the database courses at the
University. I will send them this information and they can decide if
they want to rewrite the statement or use the OFFSET trick.
regards,
- --
Rafael Martinez Guerrero
Center for Information Technology
University of Oslo, Norway
PGP Public Key: http://folk.uio.no/rafael/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
iEYEARECAAYFAlIm1/8ACgkQBhuKQurGihRAogCePl6G51w8dfYMruj+qSm4Vsjl
coMAn2sjyv6PcfsKhASC7ct0WI4YKRtJ
=FdeD
-----END PGP SIGNATURE-----
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
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: r.m.guerrero@usit.uio.no, tgl@sss.pgh.pa.us
Subject: Re: SQL statement over 500% slower with 9.2 compared with 9.1
In-Reply-To: <5226D7FF.7020000@usit.uio.no>
* 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