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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BigInt or NOT

Status
Not open for further replies.

JayKusch

MIS
Oct 30, 2001
3,199
US
Is there a disadvantage in using BigInt for every ID field and such in a record or will the use of too many Bigints in a record cause page splits?

Thanks

J. Kusch
 
Wouldn't the page splits be the disadvantage of using too many bigints? ;-)

I can't really see what the advantage would be to using bigints, unless your ID values are getting close to becoming out of range for an int. In which case, there is not much you can do to get around it. Using bigints judiciously should not cause too many problems.

Hope this helps,

Alex

[small]----signature below----[/small]
Now you can go where the people are one!
Now you can go where they get things done!
 
So you are agreeing that too many BigInt in a table could cause a page split?

If so, what would be the max number of fields set as a BigInt a record could have before a page split would occure?
(and lets say there are no other fields of any other datatype in the table)

Thanks

J. Kusch
 
Sorry, it is early. I don't think you need to worry about a page split happening if you change to bigint (a bigint is always going to be 8 bytes). This is going to happen more with large varchar columns, and updates to make them larger.

WHat I should have said is that using too many bigints will affect the number of rows that can fit in a page. This will increase the number of reads required to process a query against this table.

I don't think the difference would be all that noticeable, unless you have a very narrow table, or a whole lot of integer columns being changed to bigint.

Now I'm going to get some more caffeine [blush]

Hope this helps,

Alex

[small]----signature below----[/small]
Now you can go where the people are one!
Now you can go where they get things done!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top