Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 796869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:42:29+00:00 2026-05-14T22:42:29+00:00

For a scientific project of mine I am developing (in C#4 and T-SQL) an

  • 0

For a scientific project of mine I am developing (in C#4 and T-SQL) an application potentially meant to handle very big quantities of very simple records performing simple operations with them (a scientific simulation engine, not a linear time-series cruncher). I’d like to use 64-bit integers as primary keys for better capacity.

I am going to integrate using of Entity Framework, POCO collections and arrays processing and T-SQL stored procedures practically.

I am going to store a database on an SQL Server 2008 and access it from multiple application instances simultaneously for distributed processing.

SQL Server and application instances are going to be run on 32-bit Windows XP systems, sometimes on completely 64-bit-unaware hardware.

What penalties am I going to face for using 64-bit integer types as primary keys?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T22:42:30+00:00Added an answer on May 14, 2026 at 10:42 pm

    As long as you stick to reading and writing those numbers (ie no arithmetic, just database queries), the performance hit will be negligible. It will be like using 2 ints as parameters instead of 1.

    Once you start doing arithmetic on them however, it starts to get messy. Addition and subtraction is roughly 3 times as slow as for normal ints. Multiplication and division is a LOT slower, over an order of magnitude. I posted the code for multiplying 2 64-bit numbers on a 32-bit cpu somewhere on this site, I could look it up if you want, but it’s over 3 pages long.

    Seeing how you’re talking about ID fields however, you shouldn’t be doing any arithmetic on them right? So you should be fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a scientific application used to perform physical simulations. The algorithms used
I'm developing a scientific application that has to estimate (as best as possible) the
I am currently involved in developing a large scientific computing project, and I am
I am working in scientific computing and developing a petsc-based application for a multi-cpu-system.
I am working for a scientific project and would like to use the Amazon
I'm working on project that lets users choose some scientific authors and columnists and
In a scientific application I'm writing (vb.net) I use a huge collection of object
I'm developing an image processing project and I come across the word occlusion in
I have a project that is an open source application for a specific type
in the field of scientific simulations (physics) I am thinking about developing some new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.