Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VEbia-0004dE-SQ for pgsql-performance@arkaria.postgresql.org; Wed, 28 Aug 2013 09:07:13 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VEbia-0005kA-8b for pgsql-performance@arkaria.postgresql.org; Wed, 28 Aug 2013 09:07:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VEbiZ-0005k4-EE for pgsql-performance@postgresql.org; Wed, 28 Aug 2013 09:07:11 +0000 Received: from mail-out2.uio.no ([2001:700:100:10::58]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VEbiX-0007fE-Ec for pgsql-performance@postgresql.org; Wed, 28 Aug 2013 09:07:11 +0000 Received: from mail-mx4.uio.no ([129.240.10.45]) by mail-out2.uio.no with esmtp (Exim 4.75) (envelope-from ) id 1VEbiV-0008KX-51; Wed, 28 Aug 2013 11:07:07 +0200 Received: from bbking.uio.no ([129.240.6.205]) by mail-mx4.uio.no with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) user rafael (Exim 4.80) (envelope-from ) id 1VEbiU-0004MM-L5; Wed, 28 Aug 2013 11:07:07 +0200 Message-ID: <521DBDB9.6030107@usit.uio.no> Date: Wed, 28 Aug 2013 11:07:05 +0200 From: Rafael Martinez Organization: University of Oslo User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130806 Thunderbird/17.0.8 MIME-Version: 1.0 To: Tomas Vondra CC: pgsql-performance@postgresql.org Subject: Re: SQL statement over 500% slower with 9.2 compared with 9.1 References: <521B4B2A.5010800@usit.uio.no> <521C6F1F.5070901@usit.uio.no> <521D19BD.70208@fuzzy.cz> In-Reply-To: <521D19BD.70208@fuzzy.cz> X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-UiO-Ratelimit-Test: rcpts/h 2 msgs/h 1 sum rcpts/h 3 sum msgs/h 2 total rcpts 1676 max rcpts/h 23 ratelimit 0 X-UiO-Spam-info: not spam, SpamAssassin (score=-7.3, required=5.0, autolearn=disabled, FS_LARGE_PERCENT2=2.645, RP_MATCHES_RCVD=-1.94, UIO_MAIL_IS_INTERNAL=-5, UIO_PGP_SIGNED=-3, uiobl=NO, uiouri=NO) X-UiO-Scanned: 0492D3AE8278143D564EA099409A16690A3010A5 X-UiO-SPAM-Test: remote_host: 129.240.6.205 spam_score: -72 maxlevel 80 minaction 2 bait 0 mail/h: 1 total 1696 max/h 23 blacklist 0 greylist 0 ratelimit 0 X-Pg-Spam-Score: -2.5 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/27/2013 11:27 PM, Tomas Vondra wrote: [............] > I don't immediately see where's the problem - maybe some other > hacker on this list can. Can you prepare a testcase for this? I.e. > a structure of the tables + data so that we can reproduce it? > Hello Of course, you can download a SQL dump of the tables involved, here: http://folk.uio.no/rafael/filmdatabase_testcase.sql.gz This file is 357M gunzipped and 101M gzipped. When restored in a database it will use 1473MB. # \d+ List of relations Schema | Name | Type | Owner | Size | Description - --------+-------------------+-------+----------+--------+------------- public | filmitem | table | postgres | 41 MB | public | filmparticipation | table | postgres | 540 MB | public | person | table | postgres | 85 MB | (3 rows) [dbpg-hotel-utv:5432/postgres@fdb_testcase][]# \di+ List of relations Schema | Name | Type | Owner | Table | Size | Description - --------+--------------------------------+-------+----------+-------------------+--------+------------- public | filmitempkey | index | postgres | filmitem | 26 MB | public | filmparticipationfilmidindex | index | postgres | filmparticipation | 232 MB | public | filmparticipationpersonidindex | index | postgres | filmparticipation | 232 MB | public | filmparticipationpkey | index | postgres | filmparticipation | 232 MB | public | personlastnameindex | index | postgres | person | 41 MB | public | personpkey | index | postgres | person | 37 MB | 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) iEYEARECAAYFAlIdvbkACgkQBhuKQurGihTZ0ACgk5ZpAvBFdhJs7A3xm3h80VhR AX4AoIp+tSeeQtmmQh7ShP5WFI3hS+gp =wK/M -----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