Jump to content

Question

Hello All;

I am working through optimizing my app and step one is to ensure I'm using the proper field types.

 

Is there an article that describes how much data is used per record per field type?

 

Specifically:

  • General Number
  • Integer Number
  • Currency Number
  • Yes/No
  • Text(255)
  • Text(64000)

I have a pretty good guess on how these rank, but more detailed information on exact data used will help greatly.

 

Thanks

CHAD

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

I tried define types using maximal values.

 

General Number - allows 15 digits, probably, type is float = 8 bytes per record

 

Integer Number - from -2147483648 to 2147483647, probably, type is int = 4 bytes per record

 

Currency Number  - from -922337203685477.5808 to 922337203685477.5807, probably, type is money =  8 bytes per record

 

Yes/No - probably, 1 byte per record

 

Text(255) and Text(64000) - as far as I know, if you can use Unicode, it is probably ntext for Text64000 and probably nvarchar for Text255 (because with long string the size of a table growth faster) - so, I think, storage size, in bytes, is two times the string length that is entered for both types.

 

But I am not sure about answers :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...