Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 9F39E6500A4 for ; Thu, 16 Oct 2008 11:40:57 -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 47201-01 for ; Thu, 16 Oct 2008 11:40:49 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from tamriel.snowman.net (tamriel.snowman.net [72.66.115.51]) by postgresql.org (Postfix) with ESMTP id 55E7264FFAA for ; Thu, 16 Oct 2008 11:40:49 -0300 (ADT) Received: by tamriel.snowman.net (Postfix, from userid 1000) id 081D8222A5; Thu, 16 Oct 2008 10:40:47 -0400 (EDT) Date: Thu, 16 Oct 2008 10:40:47 -0400 From: Stephen Frost To: Tomasz Ostrowski Cc: Mikkel H?gh , pgsql-general Subject: Re: Drupal and PostgreSQL - performance issues? Message-ID: <20081016144046.GH4452@tamriel.snowman.net> Mail-Followup-To: Tomasz Ostrowski , Mikkel H?gh , pgsql-general 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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fd5uyaI9j6xoeUBo" Content-Disposition: inline In-Reply-To: <48F70157.7010601@batory.org.pl> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/2.6.26-1-amd64 (x86_64) X-Uptime: 10:37:28 up 11 days, 8:56, 18 users, load average: 0.00, 0.03, 0.01 User-Agent: Mutt/1.5.18 (2008-05-17) 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/682 X-Sequence-Number: 138931 --fd5uyaI9j6xoeUBo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline * Tomasz Ostrowski (tometzky@batory.org.pl) wrote: > There is an issue report with lengthy discussion on drupal.org: > http://drupal.org/node/196862 > And a proposed patch: > http://drupal.org/files/issues/drupal_lookup_path-5.x.patch.txt > which uses "limit 1". This patch is not applied though. I don't know why. 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 --fd5uyaI9j6xoeUBo Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkj3Um4ACgkQrzgMPqB3kihHDACfTa2lsORg0lokVRHb9oVrk0Ec K5UAn0BzG8zwuBJ/ktAYlzSDRiKxqNKa =oTk8 -----END PGP SIGNATURE----- --fd5uyaI9j6xoeUBo--