Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Change in datatypes

Author  Topic 

scelamko
Constraint Violating Yak Guru

309 Posts

Posted - 2007-02-14 : 12:01:50
Hi,

I am trying to tune the performance of the database. I have table with ID column which is referenced by 5 other tables. The ID column currently is of datatype of FLOAT, I want to change it to INT. For me to change the datatype of the ID column, I have to the change the datatype of dependent columns too.

Apart from saving the storage bytes from float to int, will there be any gain in the performance. The column has only integer values and the table has 12 million rows.

any suggestions/inputs if the change in the datatype will improve the performance.

Thanks

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-02-14 : 12:16:58
Yes, there will be a performance gain.
FLOAT occupies 8 bytes for numbers greater that 7 digits, INT only 4 bytes.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2007-02-14 : 12:26:17
Operations with integers are faster than operations with floating point numbers.

Smaller tables mean that SQL Server has less data to process, so that improves performance.





CODO ERGO SUM
Go to Top of Page
   

- Advertisement -