From: Richard Huxton <dev@archonet.com>
To: shyamperi@davlin.co.in
To: pgsql-performance@postgresql.org
Subject: Re: A Basic Question
Date: Fri, 3 Oct 2003 11:10:25 +0100
Message-ID: <200310031110.25776.dev@archonet.com> (raw)
In-Reply-To: <6681508.1065164977817.JavaMail.tomcat@mail.davlin.co.in>
References: <6681508.1065164977817.JavaMail.tomcat@mail.davlin.co.in>
On Friday 03 October 2003 07:34, shyamperi@davlin.co.in wrote:
> 12:28p
> Dear All,
> This question is regarding the performance of queries in general.
> The performance of the queries wud varying depending on the no. Of tuples
> it is returning, and the sort of alogorithm that will be implemented or the
> retrieval. Now if the relation returns zero tuples.. (the seq, and the
> index scan is the best option) and if there are 1 or more then rest
> PG-supported scans will be the best. Now here is where I am having a bit of
> considerations. My relation works fast, when it returns more than on tuple.
> But get's slow when it returns zero tuple. Now how shud I got abt it.
If PG has to examine a lot of tuples to rule them out, then returning no rows
can take longer.
If you post EXPLAIN ANALYSE output for both queries, someone will be able to
explain why in your case.
--
Richard Huxton
Archonet Ltd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: dev@archonet.com, shyamperi@davlin.co.in
Subject: Re: A Basic Question
In-Reply-To: <200310031110.25776.dev@archonet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox