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
 General SQL Server Forums
 New to SQL Server Programming
 I don't know what to choose.. BIGINT OR DECIMAL.

Author  Topic 

Tarvo
Starting Member

2 Posts

Posted - 2009-12-20 : 11:25:57
I don't know what field type to choose for my numeric fields.

I have about 50 tables of which each have about 10 fields whose values will likely be 100,000,000,000-100,000,000,000,000. No negative values.

I know that having that many big fields will eat my servers memory. Since bigint can hold up 18,446,744,073,709,551,615 it seems such a waste to use it. Should I use decimal instead for better performance?

I'm trying to utilize my script because the on script on my old server, mysql was utilizing 100% of the servers memory at least a few times a day. That server had 4GB of ram and a pretty powerful processor. No more than 100 users browsing my site.

It's a game site by the way, that's why I need so many big fields.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-20 : 11:29:11
I'd use bigint. But are you using Microsoft SQL Server or MySql?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

Tarvo
Starting Member

2 Posts

Posted - 2009-12-20 : 12:50:06
Thanks. I'm using MySql.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-20 : 13:10:15
Although your question could be answered by either Microsoft SQL Server professionals or MySql professionsls since it's a simple data type question, for future questions related to your database I'd suggest posting them on a MySql forum instead since this site is specifically for Microsoft SQL Server. Both dbforums.com and mysql.com have MySql forums, so you'll get better help from those.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -