pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Cramer <pg@fastcrypt.com>
To: sathiya psql <sathiya.psql@gmail.com>
Cc: A. Kretschmer <andreas.kretschmer@schollglas.com>
Cc: Mark Mielke <mark@mark.mielke.cc>
Cc: pgsql-performance@postgresql.org
Subject: Re: count * performance issue
Date: Thu, 6 Mar 2008 06:50:17 -0500
Message-ID: <B94D3180-BB72-43EB-BA1E-90CF53705386@fastcrypt.com> (raw)
In-Reply-To: <f966c2ee0803052243w723e2866gbfc37128620d1c6d@mail.gmail.com>
References: <f966c2ee0803052142l6a105678jfe2da92a0d9371@mail.gmail.com>
	<f966c2ee0803052143k4570d771o6c300647d3b987d@mail.gmail.com>
	<20080306060829.GA21084@a-kretschmer.de>
	<bf54be870803052215y5bb56235k5ea05ada1d701022@mail.gmail.com>
	<47CF8EA6.8070503@mark.mielke.cc>
	<20080306063643.GB21084@a-kretschmer.de>
	<f966c2ee0803052243w723e2866gbfc37128620d1c6d@mail.gmail.com>


On 6-Mar-08, at 1:43 AM, sathiya psql wrote:

> is there any way to explicitly force the postgres to use index scan
>
>

If you want to count all the rows in the table there is only one way  
to do it (without keeping track yourself with a trigger ); a seq scan.

An index will not help you.

The only thing that is going to help you is really fast disks, and  
more memory, and you should consider moving to 8.3 for all the other  
performance benefits.

Dave 



view thread (62+ messages)  latest in thread

Message-ID: <B94D3180-BB72-43EB-BA1E-90CF53705386@fastcrypt.com>
Permalink:  ../B94D3180-BB72-43EB-BA1E-90CF53705386@fastcrypt.com/
Also on:    postgresql.org/message-id/B94D3180-BB72-43EB-BA1E-90CF53705386@fastcrypt.com

 · 

reply

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: pg@fastcrypt.com, sathiya.psql@gmail.com, andreas.kretschmer@schollglas.com, mark@mark.mielke.cc
  Subject: Re: count * performance issue
  In-Reply-To: <B94D3180-BB72-43EB-BA1E-90CF53705386@fastcrypt.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