Skip site navigation (1) Skip section navigation (2)

Re: Configuration Advice

From: Steve <cheetah(at)tanabi(dot)org>
To: Chad Wagner <chad(dot)wagner(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Configuration Advice
Date: 2007-01-17 23:33:50
Message-ID: Pine.GSO.4.64.0701171831310.4471@kingcheetah.tanabi.org (view raw or flat)
Thread:
Lists: pgsql-performance
> How many rows do you typically load each night?  If it is say less than 10%
> of the total rows, then perhaps the suggestion in the next paragraph is
> reasonable.

 	Hrm.  It's very, very variable.  I'd say it's more than 10% on 
average, and it can actually be pretty close to 50-100% on certain days. 
Our data is based upon customer submissions, and normally it's a daily 
basis kind of deal, but sometimes they'll resubmit their entire year on 
certain deadlines to make sure it's all in.  Now, we don't have to 
optimize for those deadlines, just the 'average daily load'.  It's okay if 
on those deadlines it takes forever, because that's understandable.

 	However, I will look into this and see if I can figure out this 
average value.  This may be a valid idea, and I'll look some more at it.


Thanks!

Steve

> SO ... our goal here is to make this load process take less time.  It
>> seems the big part is building the big summary table; this big summary
>> table is currently 9 million rows big.  Every night, we drop the table,
>> re-create it, build the 9 million rows of data (we use COPY to put hte
>> data in when it's prepared, not INSERT), and then build the indexes on it
>
>
> Perhaps, placing a trigger on the source table and building a "change log"
> would be useful.  For example, you could scan the change log (looking for
> insert, update, and deletes) and integrate those changes into your summary
> table.  Obviously if you are using complex aggregates it may not be possible
> to adjust the summary table, but if you are performing simple SUM's,
> COUNT's, etc.  then this is a workable solution.
>
>
> -- 
> Chad
> http://www.postgresqlforums.com/
>

In response to

Responses

pgsql-performance by date

Next:From: Adam RichDate: 2007-01-17 23:37:48
Subject: Re: Configuration Advice
Previous:From: Scott MarloweDate: 2007-01-17 23:13:51
Subject: Re: Configuration Advice

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group