Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 1D7AF65009C for ; Thu, 16 Oct 2008 12:10:01 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 54427-08 for ; Thu, 16 Oct 2008 12:09:47 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.183]) by postgresql.org (Postfix) with ESMTP id 6074165010B for ; Thu, 16 Oct 2008 12:09:46 -0300 (ADT) Received: by wa-out-1112.google.com with SMTP id j4so27121wah.19 for ; Thu, 16 Oct 2008 08:09:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=pUFIRynZt4sSNzDP0JHVPcGOBqPoN6erE3UxvgRkiz4=; b=CEB6K8ZSoOaSyycXjTCWd5WGGYTbgikLnhqTZfrBFQA2C4QkU+/tZ1HXpRWO0SRbFi BDusIm889yKURViKHsn810kawmW21t7mlsErAUN8jBELwVjfP3nOIJlFS422uxLdP2Cx B2BUCOeKYFtFPTMzrhiDsbMZHwSBb+12wPITk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=gp7Iq4Ptysv60nT98GqHvsRSF2IXoWUg7UYJ5LjRBTCaN/sYGysLf6LVz9ywGR03t6 n3e79uqSG9J5RTZVTv6x4vlncWquGU41hh9IQ8kycH5iW+NrYYX0cxnI9/Jx/L4Vr8sG ZSbQDnBMeZyJz7vngPSDDuOWg4gVWOaZ6wS8E= Received: by 10.114.126.1 with SMTP id y1mr2257418wac.52.1224169784830; Thu, 16 Oct 2008 08:09:44 -0700 (PDT) Received: by 10.114.131.20 with HTTP; Thu, 16 Oct 2008 08:09:44 -0700 (PDT) Message-ID: <10268b3e0810160809l3f16fba3k1d45271fbbe865b@mail.gmail.com> Date: Thu, 16 Oct 2008 17:09:44 +0200 From: DelGurth To: "Tomasz Ostrowski" , "Mikkel H?gh" , pgsql-general Subject: Re: Drupal and PostgreSQL - performance issues? In-Reply-To: <20081016144046.GH4452@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48F4F053.1060201@hagander.net> <7438A981-4B6A-4E5A-A1E0-50432CDEFB00@hoegh.org> <48F6EE94.8010904@batory.org.pl> <4BE94DFB-8917-4175-9083-7DEABC30BD7F@hoegh.org> <48F70157.7010601@batory.org.pl> <20081016144046.GH4452@tamriel.snowman.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200810/686 X-Sequence-Number: 138935 On Thu, Oct 16, 2008 at 4:40 PM, Stephen Frost wrote: > * Tomasz Ostrowski (tometzky@batory.org.pl) wrote: > I don't see 'limit 1' anywhere in that patch.. And you don't want to > use 'limit 1' *and* count(*), that doesn't do what you're expecting > (since count(*) is an aggregate and limit 1 is applied after). You > really want to do something more like: > > select true from tab1 limit 1; > > And then test if you got back any rows or not (which might be what > *your* patch does, hadn't looked at it yet). > > Thanks, > > Stephen Seems Tomasz linked to the wrong patch. The patch he meant was: http://drupal.org/files/issues/drupal_lookup_path-6.x.patch.txt Or better... he linked to the correct patch (for drupal 5.x) but the user Earnie made a mistake or something in the 5.x patch, seeing the comment[1] that the patches should be the same... Also nice to see people "benchmark" differences by just executing a query once[2][3].... Wessel [1] http://drupal.org/node/196862#comment-648511 [2] http://drupal.org/node/196862#comment-649791 [3] http://drupal.org/node/196862#comment-649928