Re: Huge Data - Mailing list pgsql-general

From Shridhar Daithankar
Subject Re: Huge Data
Date
Msg-id 200401141832.45416.shridhar_daithankar@persistent.co.in
Whole thread Raw
In response to Re: Huge Data  (Sezai YILMAZ <sezai.yilmaz@pro-g.com.tr>)
List pgsql-general
On Wednesday 14 January 2004 18:09, Sezai YILMAZ wrote:
> Richard Huxton wrote:
> >PG uses MVCC to manage concurrency. A downside of this is that to verify
> > the exact number of rows in a table you have to visit them all.
> >
> >There's plenty on this in the archives, and probably the FAQ too.
> >
> >What are you using the count() for?
>
> select logid, agentid, logbody from log where logid=3000000;

How about

select logid, agentid, logbody from log where logid='3000000';

or

select logid, agentid, logbody from log where logid=3000000::int4

Basically you need to typecast the constant. Then it would use the index.

I am not sure of first form of it though. I recommend you use the later form.

 Shridhar


pgsql-general by date:

Previous
From: "Bill McMilleon"
Date:
Subject: Tool to ease development of plpgsql
Next
From: Bill Gribble
Date:
Subject: Re: check date validity