Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CHAR vs INT

Status
Not open for further replies.

Glowball

Programmer
Oct 6, 2001
373
US
Hi all -- I am using MS SQL 2000 and cannot use the BIT data type because the software accessing the data will not recognize it. I will be storing a 1 or a 0 in the column and basing queries on the contents of that column in tables that will be large but not extremely large.

I also cannot use any other variation of integer other than INT (no TINYINT, for example).

What would be best to use, CHAR(1) or INT? I'm looking for the best performance.

Thank you!
 
Well int will be faster because it doesn't have to look at the code pages (unless you are using a binary collation).
But it will use more space (and hence memory) so that might be a performance con.

Is the difference really that important - it will be minimal.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Yeah, it's probably nitpicky but I want to do it right the first time. Once it's set I can't really change it or the software gets difficult...

Our machines are pretty hefty so maybe INT is the way to go?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top