Some quick questions - Mailing list pgsql-sql

From Joshua Gooding
Subject Some quick questions
Date
Msg-id 4C597794.80300@ttitech.net
Whole thread Raw
Responses Re: Some quick questions  (Kenneth Marshall <ktm@rice.edu>)
List pgsql-sql
  I am using Postgres 8.4 with 10 partition tables.  We'll call them 
reports_00 through reports_09.

I have a field that is a BIGINT which is a 13 digit number that is the 
epoch time, which is the constraint that the table is partitioned on. 
(Between time x and y).  All of the partitions hold 10 weeks of data.   
The idea is that I would like to write a script that would truncate and 
drop the oldest week's table (after 10 weeks), rename the oldest 
remaining 9 tables, create a new table, with the current and future 
epoch date in the constraint, and continue on my merry way.

Is there anything like this already in postgres?  Secondly can it be 
done without manual intervention?  Can I do this in a function and have 
it auto run at a certain "time" based on epoch?  This is something that 
I have never gotten into so this is new territory for me, so please 
forgive me if I am asking any newbie questions here.

I've tweaked the server that I am testing postgres on.  I'm basically 
doing side by side comparisons with Oracle, trying to see if we can get 
the same or close to Oracle's performance.  I've read the Wiki article 
on tuning the PostgreSQL server, and I believe that I have gotten it 
close, but there is still a substantial gap.  Say I have a machine with 
a 4 core processor and 16GB of ram (across 4 sticks), can I tweak the 
configuration to  use all 4 cores and 1GB of ram from each physical 
stick on the machine?  This is running on a Fedora Core - 12 machine.  
Is that an OS issue or is than a Postgres configuration question?

Any advice or guidance would be greatly appreciated.

-- 
Joshua Gooding



pgsql-sql by date:

Previous
From: Kenneth Marshall
Date:
Subject: Re: What does PostgreSQL do when time goes backward?
Next
From: Kenneth Marshall
Date:
Subject: Re: Some quick questions