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 Development (2000)
 Numeric vs Decimal data type...mabye?

Author  Topic 

CactusJuice
Starting Member

46 Posts

Posted - 2002-10-16 : 18:45:36
I am creating a lookup table that will have less than 100 records. They are numberic as such...

1
1.1
1.2
1.3
1.4
1.5
2
2.1
2.2
2.3
2.4
2.5
3
3.1
etc etc...up through 10.5

Normally I would use datatype varchar but since this column will be a possible search criteria (will have a FK in the Customers table) I am thinking maybe the type should be Numeric, and set the precision an scale attributes. Any opinions? Will this make any performance difference or am I spitting hairs? The database has just over 5K records right now.

thanks,

Cameron

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-10-16 : 18:51:46
Do you need to use decimals? In other words, what about using 1 through 100, 105, or whatever the upper limit is? In that case, you could use a byte column (1 byte in size) which can store values from 0 to 255. Since it's an integer value you'll see a slight increase in performance, but really only if you're dealing with millions of rows.

Go to Top of Page
   

- Advertisement -