> -----Original Message-----
> From: Tom Lane [mailto:tgl@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 <David_Greco@harte-hanks.com> 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
> problem.
> .......................................
> .......................................
> .......................................
> .......................................
> In real life, this query is actually bound and parameterized,
>
> In that case, an EXPLAIN using literal constants is next door
> to useless in terms of telling you what will happen in real
> life. You need to pay attention to exactly how the
> parameterization is done. Again, I'm suspecting a wrong
> datatype indication.
>
> regards, tom lane
>
To see what happens with parametrized query in "real life" you could try
"auto_explain" contrib module.
Regards,
Igor Neyman