Re: [GENERAL] Huge Data

2004-01-18 Thread Shridhar Daithankar
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. >

Re: [GENERAL] Huge Data

2004-01-14 Thread Richard Huxton
On Wednesday 14 January 2004 12:27, Sezai YILMAZ wrote: > Richard Huxton wrote: > >There's plenty on this in the archives, and probably the FAQ too. > > > >What are you using the count() for? > > I use count() for some statistics. Just to show how many records > collected so far. If you want an ac

Re: [GENERAL] Huge Data

2004-01-14 Thread Richard Huxton
On Wednesday 14 January 2004 12:39, Sezai YILMAZ wrote: > > select logid, agentid, logbody from log where logid=300; At a guess, because logid is bigint, whereas 30 is taken to be integer. Try ... where logid = 30::bigint; This is in the FAQ too I think, and is certainly in the archi

Re: [GENERAL] Huge Data

2004-01-14 Thread Shridhar Daithankar
On Wednesday 14 January 2004 18:22, Matthew Lunnon wrote: > select logid, agentid, logbody from log where logid=300; > > this query also returns after about 120 seconds. The table log has about > 7 million records, and logid is the primary key of log table. What about > that? Why is it

Re: [GENERAL] Huge Data

2004-01-14 Thread Matthew Lunnon
ubject: Re: [GENERAL] Huge Data 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

Re: [GENERAL] Huge Data

2004-01-14 Thread Shridhar Daithankar
On Wednesday 14 January 2004 17:57, Sezai YILMAZ wrote: > Richard Huxton wrote: > >What are you using the count() for? > > I use count() for some statistics. Just to show how many records > collected so far. Rather than doing count(*), you should either cache the count in application memory or

Re: [GENERAL] Huge Data

2004-01-14 Thread Sezai YILMAZ
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

Re: [GENERAL] Huge Data

2004-01-14 Thread Sezai YILMAZ
Richard Huxton wrote: On Wednesday 14 January 2004 11:11, Sezai YILMAZ wrote: Hi, I use PostgreSQL 7.4 for storing huge amount of data. For example 7 million rows. But when I run the query "select count(*) from table;", it results after about 120 seconds. Is this result normal for such a huge

Re: [GENERAL] Huge Data

2004-01-14 Thread Richard Huxton
On Wednesday 14 January 2004 11:11, Sezai YILMAZ wrote: > Hi, > > I use PostgreSQL 7.4 for storing huge amount of data. For example 7 > million rows. But when I run the query "select count(*) from table;", it > results after about 120 seconds. Is this result normal for such a huge > table? Is there

[GENERAL] Huge Data

2004-01-14 Thread Sezai YILMAZ
Hi, I use PostgreSQL 7.4 for storing huge amount of data. For example 7 million rows. But when I run the query "select count(*) from table;", it results after about 120 seconds. Is this result normal for such a huge table? Is there any methods for speed up the querying time? The huge table has