Odd performance results

Поиск
Список
Период
Сортировка
Искать

Odd performance results

От:
"Medora Schauer" <mschauer@fairfield.com>
Дата:

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
***********************************************************************


Re: Odd performance results

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Medora Schauer"  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

Re: Odd performance results

От:
"Medora Schauer" <mschauer@fairfield.com>
Дата:

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"  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
> 
FAQ