Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 97DC5633B13 for ; Mon, 30 Mar 2009 17:13:33 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 90264-10 for ; Mon, 30 Mar 2009 17:13:24 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.28]) by mail.postgresql.org (Postfix) with ESMTP id 7DBB6632211 for ; Mon, 30 Mar 2009 17:13:28 -0300 (ADT) Received: by yw-out-2324.google.com with SMTP id 3so1431130ywj.73 for ; Mon, 30 Mar 2009 13:13:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=zIQ4c9INKlqqItDRp0/Ae1gWCh95fd1vwctb+MGxPKM=; b=M8Xkw8vsxeAXTHeNRtQkdkblHiyADgh8HsjIk1PYh8AE8FLB4yc/4t/8occGe80vRW RdwHgHJuCThZA0+z/R28UwaRHAoW47GF+EfLkZVSUxV4VeSoZxOwmlf9P4/s+oVugbMp L6bhDfMqXqZu+/xb1opI2dZBYmtZFpj55TVic= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=SbbovtSlWBQ3rzNvlUKiE9D0GTzF3TPiWF4FSAEpOTrzs3qrqU6ZXLAtV+NR57WRl8 ESAD54PPS0MR6As9pvTl/fsnIMp7gTd3NucuagVLtH+lJD99SUg/sckbBK4nUOQ2p7eS OxlxiIaREl+n2MHrJUReqG/OLq7Xvpsjy5bcs= MIME-Version: 1.0 Received: by 10.100.135.16 with SMTP id i16mr4334898and.99.1238444007604; Mon, 30 Mar 2009 13:13:27 -0700 (PDT) In-Reply-To: <56164.199.172.169.17.1238443348.squirrel@localhost> References: <58166.199.172.169.15.1238435452.squirrel@localhost> <603c8f070903301131p8086067ob552d09e8b21c82@mail.gmail.com> <56921.199.172.169.36.1238438533.squirrel@localhost> <57654.199.172.169.17.1238442145.squirrel@localhost> <56164.199.172.169.17.1238443348.squirrel@localhost> Date: Mon, 30 Mar 2009 16:13:27 -0400 Message-ID: <603c8f070903301313u1a9606a3m27da187b5e376785@mail.gmail.com> Subject: Re: Trying to track down weird query stalls From: Robert Haas To: dan@sidhe.org Cc: Scott Marlowe , pgsql-performance@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.037 tagged_above=0 required=5 tests=AWL=0.037 X-Spam-Level: X-Archive-Number: 200903/426 X-Sequence-Number: 33348 On Mon, Mar 30, 2009 at 4:02 PM, wrote: >> On Mon, Mar 30, 2009 at 1:42 PM, =A0 wrote: >>>> On Mon, Mar 30, 2009 at 12:42 PM, =A0 wrote: >>>>> Arguably in this case the actual query should run faster than the >>>>> EXPLAIN >>>>> ANALYZE version, since the cache is hot. (Though that'd only likely >>>>> shave >>>>> a few dozen ms off the runtime) >>>> >>>> Joining a lot of tables together? =A0Could be GEQO kicking in. >>> >>> Only if I get different query plans for the query depending on whether >>> it's being EXPLAIN ANALYZEd or not. That seems unlikely... >> >> Yes, you can. =A0In fact you often will. =A0Not because it's being >> explained or not, just because that's how GEQO works. > > Ouch. I did *not* know that was possible -- I assumed that the plan was > deterministic and independent of explain analyze. The query has seven > tables (one of them a temp table) and my geqo_threshold is set to 12. If > I'm reading the docs right GEQO shouldn't kick in. Any chance we could see the actual query? Right now I think we are shooting in the dark. ...Robert