From: | Shridhar Daithankar <shridhar_daithankar(at)persistent(dot)co(dot)in> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Huge Data |
Date: | 2004-01-14 13:02:45 |
Message-ID: | 200401141832.45416.shridhar_daithankar@persistent.co.in |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Shridhar Daithankar | 2004-01-14 13:07:07 | Re: Huge Data |
Previous Message | Matthew Lunnon | 2004-01-14 12:52:31 | Re: Huge Data |