Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TNwve-0000bt-Nu for pgsql-bugs@postgresql.org; Tue, 16 Oct 2012 02:30:46 +0000 Received: from mail-pb0-f46.google.com ([209.85.160.46]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TNwvY-0005tF-Ea for pgsql-bugs@postgresql.org; Tue, 16 Oct 2012 02:30:45 +0000 Received: by mail-pb0-f46.google.com with SMTP id rr4so5511354pbb.19 for ; Mon, 15 Oct 2012 19:30:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=GBR73pyfLRlsGsfr838Eg3Q/d6YeufNezHL93Hy8+Nw=; b=nRfLSZQJRmcmdSMSiCpu3h6r9ubko1y/1KxDVIa6wBL710wRET1f+jO8VrD5hLrPFc GZghhFFEGU7eTRpYXDdD136BICWYkB2fj9JCegrLqGYUUqpzDw0oiD8JoCzaE3oBMZUi axq6GovE/Nd6GgzcpImN5A+RNIwoGjYJPj1k1Ai95oNXKL+HegU43SsVgNeqJKK4+dvn xTS3SSFA1Z3jGpTezPUKrspK078RZFzEvaA2/F10rsef29Jb/5XNaUrPIoRso2Cg2h3Y 1uTjvIly9buJXdTVmUv1TrOjxZXxIwOKNrM9CPn6qO9B/ZjqYUnQoa1sXr7+EVU0qFgb CH2Q== Received: by 10.68.131.35 with SMTP id oj3mr42198326pbb.128.1350354637930; Mon, 15 Oct 2012 19:30:37 -0700 (PDT) Received: from ayaki.localdomain (office1.postnewspapers.com.au. [150.101.171.128]) by mx.google.com with ESMTPS id it6sm9962275pbc.14.2012.10.15.19.30.34 (version=SSLv3 cipher=OTHER); Mon, 15 Oct 2012 19:30:37 -0700 (PDT) Message-ID: <507CC6C7.6060200@ringerc.id.au> Date: Tue, 16 Oct 2012 10:30:31 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: daniel.heden@sweco.se CC: pgsql-bugs@postgresql.org Subject: Re: BUG #7602: Select with many joins against the same table is very slow compared to 9.2.0. References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Gm-Message-State: ALoCoQktZOdBgcnkeKtQeFDd7kq1oOnlmU9A4aHcjGM5sOrGgda2lVIXjkxuzTQAAqish+chlQXS X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201210/157 X-Sequence-Number: 34457 On 10/15/2012 06:55 PM, daniel.heden@sweco.se wrote: > The following bug has been logged on the website: > > Bug reference: 7602 > Logged by: Daniel Hedén > Email address: daniel.heden@sweco.se > PostgreSQL version: 9.2.1 > Operating system: Windows 7 / Vista 64-Bit > Description: > > Select with many joins against the same table is very slow compared to > 9.2.0. > In my case 16 times, this query takes a second max on 9.2.0 but on 9.2.1 it > takes more than 30 minutes. Could you have accidentally reset `join_collapse_limit` to its default value? Show `EXPLAIN ANALYZE` output for both old and new cases, if possible. At least for the new one. (Please reply to the mailing list, not to me). -- Craig Ringer