pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
A Basic Question
2+ messages / 2 participants
[nested] [flat]

* A Basic Question
@ 2003-10-03 06:34 shyamperi@davlin.co.in
  2003-10-03 10:10 ` Re: A Basic Question Richard Huxton <dev@archonet.com>
  0 siblings, 1 reply; 2+ messages in thread

From: shyamperi@davlin.co.in @ 2003-10-03 06:34 UTC (permalink / raw)
  To: pgsql-performance

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.

-----
Warm Regards
Shÿam Peri

II Floor, Punja Building,
M.G.Road,
Ballalbagh,
Mangalore-575003 
Ph : 91-824-2451001/5
Fax : 91-824-2451050 


DISCLAIMER: This message contains privileged and confidential information and is
intended only for the individual named.If you are not the intended
recipient you should not disseminate,distribute,store,print, copy or
deliver this message.Please notify the sender immediately by e-mail if
you have received this e-mail by mistake and delete this e-mail from
your system.

Attachments:

Untitled1 (text/html, 1.2K) download <head></head><body marginwidth=4 marginheight=4 topmargin=4 leftmargin=4><P>12:28p<BR>Dear All,</P> <P>This question is regarding the performance of queries in general.</P> <P>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. <BR>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. </P> <P>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.</P> <P>Now how shud I got abt it.<BR></P><PRE>----- Warm Regards Shÿam Peri II Floor, Punja Building, M.G.Road, Ballalbagh, Mangalore-575003 Ph : 91-824-2451001/5 Fax : 91-824-2451050 </PRE></body><br><br><b> DISCLAIMER: This message contains privileged and confidential information and is intended only for the individual named.If you are not the intended recipient you should not disseminate,distribute,store,print, copy or deliver this message.Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.</b>
^ permalink raw reply [nested|flat] 2+ messages in thread

* Re: A Basic Question
  2003-10-03 06:34 A Basic Question shyamperi@davlin.co.in
@ 2003-10-03 10:10 ` Richard Huxton <dev@archonet.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Richard Huxton @ 2003-10-03 10:10 UTC (permalink / raw)
  To: shyamperi@davlin.co.in; pgsql-performance

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2003-10-03 10:10 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-10-03 06:34 A Basic Question shyamperi@davlin.co.in
2003-10-03 10:10 ` Richard Huxton <dev@archonet.com>

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