Re: What is the quickest query in the database?

From: Richard Huxton <dev(at)archonet(dot)com>
To: P G <pg_dba(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: What is the quickest query in the database?
Date: 2003-02-20 19:29:19
Message-ID: 200302201929.19071.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thursday 20 Feb 2003 5:52 pm, P G wrote:
> What is the quickest and least intrusive query in the
> database that will always succeed?
>
> select current_user;
>
> -- OR --
>
> select datname from pg_database where datname =
> 'some_database';
>
> Or would it be something else?

Probably something like

SELECT 1;

--
Richard Huxton

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Fabrizio Mazzoni 2003-02-20 19:42:44 Re: Removing spaces
Previous Message Richard Huxton 2003-02-20 19:28:16 Re: A problem with sequences...