pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Odd performance results
3+ messages / 2 participants
[nested] [flat]

* Odd performance results
@ 2003-07-31 20:29  Medora Schauer <mschauer@fairfield.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Medora Schauer @ 2003-07-31 20:29 UTC (permalink / raw)
  To: pgsql-performance


I have a table with a 3 column key.  I noticed that when I update a non-key field
in a record of the table that the update was taking longer than I thought it 
should.  After much experimenting I discovered that if I changed the data
types of two of the key columns to FLOAT8 that I got vastly improved
performance.

Orignally the data types of the 3 columns were FLOAT4, FLOAT4 and INT4.
My plaform is a PowerPC running Linux.  I speculated that the performance
improvement might be because the PowePC is a 64 bit processor but when
I changed the column data types to INT8, INT8 and INT4 I din't see any
improvement.  I also ran my test code on a Pentium 4 machine with the same
results in all cases.

This doesn't make any sense to me.  Why would FLOAT8 keys ever result
in improved performance?

I verified with EXPLAIN that the index is used in every case for the update.

My postmaster version is 7.1.3.

Any help will be greatly appreciated.

***********************************************************************
Medora Schauer
Sr. Software Engineer

Fairfield Industries
14100 Southwest Freeway
Suite 600
Sugar Land, Tx  77478-3469
USA

mschauer@fairfield.com
***********************************************************************





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Odd performance results
@ 2003-07-31 21:10  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Medora Schauer <mschauer@fairfield.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2003-07-31 21:10 UTC (permalink / raw)
  To: Medora Schauer <mschauer@fairfield.com>; +Cc: pgsql-performance

"Medora Schauer" <mschauer@fairfield.com> writes:
> I have a table with a 3 column key.  I noticed that when I update a non-key field
> in a record of the table that the update was taking longer than I thought it 
> should.  After much experimenting I discovered that if I changed the data
> types of two of the key columns to FLOAT8 that I got vastly improved
> performance.

Are there any foreign key linkages to or from this table?  Maybe the
other end of the foreign key is float8?

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Odd performance results
@ 2003-07-31 21:32  Medora Schauer <mschauer@fairfield.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Medora Schauer @ 2003-07-31 21:32 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-performance


Orignally there were but in the process of trying to figure
out what is going on I stripped everything out of the database
except the table being queried.

> 
> "Medora Schauer" <mschauer@fairfield.com> writes:
> > I have a table with a 3 column key.  I noticed that when I 
> update a non-key field
> > in a record of the table that the update was taking longer 
> than I thought it 
> > should.  After much experimenting I discovered that if I 
> changed the data
> > types of two of the key columns to FLOAT8 that I got vastly improved
> > performance.
> 
> Are there any foreign key linkages to or from this table?  Maybe the
> other end of the foreign key is float8?
> 
> 			regards, tom lane
> 



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2003-07-31 21:32 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-07-31 20:29 Odd performance results Medora Schauer <mschauer@fairfield.com>
2003-07-31 21:10 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-07-31 21:32 Re: Odd performance results Medora Schauer <mschauer@fairfield.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox