Re: [PERFORM] Real vs Int performance

2011-01-27 Thread Igor Neyman
> -Original Message- > From: Tom Lane [mailto:t...@sss.pgh.pa.us] > Sent: Wednesday, January 26, 2011 5:12 PM > To: David Greco > Cc: pgsql-performance@postgresql.org > Subject: Re: Real vs Int performance > > David Greco writes: > > Came across a problem I find perplexing. I recreat

Re: [PERFORM] Real vs Int performance

2011-01-27 Thread Mladen Gogala
On 1/27/2011 9:30 AM, Shaun Thomas wrote: I'm not sure about orders of magnitude on the storage/index side, but my tests gave us a 10% boost if just the keys are switched over to INT or BIGINT. Well, it depends on what you're doing. Searching by an integer vs. searching by a text string will p

Re: [PERFORM] Real vs Int performance

2011-01-27 Thread Shaun Thomas
On 01/27/2011 08:18 AM, Tom Lane wrote: Not if you can persuade the client-side code to output integers as integers. "numeric" type is orders of magnitude slower than integers. I sadly have to vouch for this. My company converted an old Oracle app and they changed all their primary keys (and

Re: [PERFORM] Real vs Int performance

2011-01-27 Thread Tom Lane
David Greco writes: > Right you are. Kettle is turning the number(11) field from Oracle into > a BigNumber, which is a decimal. If I cast the field into an Integer > in Kettle and keep the field an integer in Postgres, I get good > performance. Suspect the correct course of action would simply be

Re: [PERFORM] Real vs Int performance

2011-01-27 Thread David Greco
in Oracle numeric(11,0) fields in Postgres. -Original Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Wednesday, January 26, 2011 5:12 PM To: David Greco Cc: pgsql-performance@postgresql.org Subject: Re: [PERFORM] Real vs Int performance David Greco writes: > Came acros

Re: [PERFORM] Real vs Int performance

2011-01-26 Thread Tom Lane
David Greco writes: > Came across a problem I find perplexing. I recreated the dimensional tables > in Oracle and the fields that are integers in Oracle became integers > in Postgres. Was experiencing terrible performance during the load and > narrowed down to a particular dimensional lookup pro

Re: [PERFORM] Real vs Int performance

2011-01-26 Thread Kevin Grittner
David Greco wrote: > If I change this field from an integer to a real, I get about a > 70x increase in performance of the query. > I wished to simplify things a bit here (and don't yet know how to > EXPLAIN ANALYZE a parameterized query). > carrier_source_id | integer |

[PERFORM] Real vs Int performance

2011-01-26 Thread David Greco
New to Postgres and am prototyping a migration from Oracle to Postgres 9.0.1 on Linux. Starting with the data warehouse. Current process is to load the data from our OLTP (Oracle), dump it into another instance of Oracle for staging and manipulation, then extract it and load it into Infobright.