Re: select count() out of memory

Lists: pgsql-general
From: aklaver(at)comcast(dot)net (Adrian Klaver)
To: Thomas Finneid <tfinneid(at)student(dot)matnat(dot)uio(dot)no>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: select count() out of memory
Date: 2007-10-28 16:35:03
Message-ID: 102820071635.10028.4724BA37000E6D710000272C22007456729D0A900E04050E@comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general


-------------- Original message ----------------------
From: Thomas Finneid <tfinneid(at)student(dot)matnat(dot)uio(dot)no>
>
>
> Adrian Klaver wrote:
> > I might be missing the point, but couldn't you do a Copy to a single table
> > instead of multiple inserts and avoid the index overhead.
>
> Are you saying, have one large table with indexes and do a COPY to it or
> are you saying a one small empty table and do a COPY to it?
>
> thomas

I'm thinking do a COPY to one large table. If the cost of indexing is relatively fixed as
you indicated in your previous post then you reduce the indexing overhead to each
COPY operation instead of each insert.

--
Adrian Klaver
aklaver(at)comcast(dot)net


From: Thomas Finneid <tfinneid(at)student(dot)matnat(dot)uio(dot)no>
To: Adrian Klaver <aklaver(at)comcast(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: select count() out of memory
Date: 2007-10-28 19:31:19
Message-ID: 4724E387.30101@ifi.uio.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Adrian Klaver wrote:
> I'm thinking do a COPY to one large table. If the cost of indexing is relatively fixed as
> you indicated in your previous post then you reduce the indexing overhead to each
> COPY operation instead of each insert.

No, what I meant whas that creating an index on a table with data after
the data has been COPYed, is faster than having one large table with an
existing index where data is added all the time and the index is
updatesd along with that.

I did do a performance test some time ago on that or something similar,
I dont remember the exact details, but what ever I tested it was slower.
But I will try exactly what you suggested tomorrow, when at the test
machine. The issue is it has to runn for some time before it is possible
to see any lasting degradation in performance.

thomas