Re: Drupal and PostgreSQL - performance issues? - Mailing list pgsql-general

From Stephen Frost
Subject Re: Drupal and PostgreSQL - performance issues?
Date
Msg-id 20081016144046.GH4452@tamriel.snowman.net
Whole thread Raw
In response to Re: Drupal and PostgreSQL - performance issues?  (Tomasz Ostrowski <tometzky@batory.org.pl>)
Responses Re: Drupal and PostgreSQL - performance issues?  (DelGurth <delgurth@gmail.com>)
Re: Drupal and PostgreSQL - performance issues?  (Tomasz Ostrowski <tometzky@batory.org.pl>)
List pgsql-general
* 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

Attachment

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Numbering rows
Next
From: "Merlin Moncure"
Date:
Subject: Re: PL/pgSQL stored procedure returning multiple result sets (SELECTs)?