[SQL] oracle to postgres migration question

2010-06-15 Thread Joshua Gooding

Hello,

I'm looking for the postgres equivalent of oracles: set numwidth 
command.  Is there an equivalent?


Thanks in advance!

- Josh

--
Joshua Gooding
Software Engineer
TTi Technologies Wheeling, WV 26003

w: 304-233-5680 x 308
c: 304-794-8341


--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


Re: [SQL] oracle to postgres migration question

2010-06-16 Thread Joshua Gooding

On 6/16/2010 1:02 AM, silly sad wrote:

On 06/16/10 02:45, Bruce Momjian wrote:

Scott Marlowe wrote:

Note that psql automagically right justifies numerics and dynamically
sizes all columns so you don't have to do as much of this stuff.
Oracle always made me feel like I was operating the machine behind the
curtain in the Wizard of Oz, lots of handles and switches and knobs I
had to mess with to get useful output.


Yeah, I have heard that description many times in other forms.


count me in :-)

i even suspect this exactly is a Secret of the oracle Power.
"higher performance through lower level of control"



sorry for the delay guys, and thank you for all the replies.

The problem I was having, is the data in field 'track_start' was a 
number type in oracle.  I switched it out to a real in postgres, however 
when I displayed the column (via psql) it was printing out for example 
(1.23546e12).  I know you could format the output via Sql Plus but I was 
not sure what (if anything) you could do in postgres for that.  That 
being said, I then re-modified the field type and it displays properly.  
I went from a real to a integer type and it seemed to clear up every 
issue I was having (both displaying and programatically)


--
Joshua Gooding
Software Engineer
TTi Technologies Wheeling, WV 26003

w: 304-233-5680 x 308
c: 304-794-8341


--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


[SQL] question about partitioning

2010-06-24 Thread Joshua Gooding
Right now I am in the process of migrating an Oracle DB over to Postgres 
8.4.3.  The table is partitioned by size.  Is there anyway to partition 
the new postgres table by size?  I created some partitions for the new 
table, but I didn't give postgres any rules to partition by, so I have 
250M test records in one table.  Any ideas or thoughts on how to build 
the rules for the table by size would be greatly appreciated.


--
Joshua Gooding
Software Engineer
TTi Technologies Wheeling, WV 26003

w: 304-233-5680 x 308
c: 304-794-8341


--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


Re: [SQL] question about partitioning

2010-06-24 Thread Joshua Gooding

I think I replied to the individual and not to the list before

As of right now size doesn't matter, I need to partition it via a date.  
10 partitions, 10 weeks worth of data.


I was thinking of partitioning it off every 32GB of data, but that is 
not exactly what I am looking to do.


Joshua Gooding


On 6/24/2010 11:06 AM, Jasen Betts wrote:

On 2010-06-24, Joshua Gooding  wrote:
   

Right now I am in the process of migrating an Oracle DB over to Postgres
8.4.3.  The table is partitioned by size.  Is there anyway to partition
the new postgres table by size?  I created some partitions for the new
table, but I didn't give postgres any rules to partition by, so I have
250M test records in one table.  Any ideas or thoughts on how to build
the rules for the table by size would be greatly appreciated.
 

by size of what?

   


--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


Re: [SQL] question about partitioning

2010-06-24 Thread Joshua Gooding
I'm trying to figure out the logic behind the date parameters though.  I 
don't have to worry at all about partition size.



Joshua Gooding


On 6/24/2010 3:37 PM, Little, Douglas wrote:

I don't know how you would partition by size.
Date is a good candidate, and roughly wouldn't you have the same number of 
tx's/day
You'll only benefit query performance if you include the partitioning column in 
the where clause.
If you have a surrogate pk, you could also use this to partition.  Using a 
range key you would probably get relatively constant partition size.

Doug



-Original Message-
From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On 
Behalf Of Joshua Gooding
Sent: Thursday, June 24, 2010 2:31 PM
To: pgsql-sql@postgresql.org
Subject: Re: [SQL] question about partitioning

I think I replied to the individual and not to the list before

As of right now size doesn't matter, I need to partition it via a date.
10 partitions, 10 weeks worth of data.

I was thinking of partitioning it off every 32GB of data, but that is
not exactly what I am looking to do.

Joshua Gooding


On 6/24/2010 11:06 AM, Jasen Betts wrote:
   

On 2010-06-24, Joshua Gooding   wrote:

 

Right now I am in the process of migrating an Oracle DB over to Postgres
8.4.3.  The table is partitioned by size.  Is there anyway to partition
the new postgres table by size?  I created some partitions for the new
table, but I didn't give postgres any rules to partition by, so I have
250M test records in one table.  Any ideas or thoughts on how to build
the rules for the table by size would be greatly appreciated.

   

by size of what?


 
   


--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


[SQL] Some quick questions

2010-08-04 Thread Joshua Gooding
 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


--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


[SQL] available RPM package for 8.4.4?

2010-09-21 Thread Joshua Gooding
 Is it possible to just download the RPM package for postgresql server 
8.4 for fedora and NOT install it through the yum tree?  If so where can 
I go to get it.  I am looking all through yum.pgrpms.org and I am coming 
up a bit short.  Thanks.


--
Joshua Gooding


--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql