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 6248591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:05:13+00:00 2026-05-24T13:05:13+00:00

If a sql server column is a string versus a guid, how would joins

  • 0

If a sql server column is a string versus a guid, how would joins be impacted (assuming no indexes). Would it matter?

Also, when you put an index on a string column, does it become as efficient as an integer column with an index?

i.e. when you put an index on either a string or integer column, is the resulting index built the same way and therefore performs equally?

  • 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-24T13:05:14+00:00Added an answer on May 24, 2026 at 1:05 pm

    All other things being equal, less data is better. And by data I mean bytes.

    For almost all SQL Server applications, the tightest bottleneck is disk I/O, and pulling less data from disk (or cache) makes everything faster.

    This is variable depending on your declared string length. Bear in mind that GUIDs are 16 bytes, and varchar are 1 byte per character. nvarchar are 2 bytes per character. (n)varchar also have a 2 byte overhead per row to define the string length.

    Space/bytes wise, a String is bigger than a GUID is bigger than an int.

    The smaller/tighter your field definition the better, so int is faster than a guid, which is faster than a string.

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

Sidebar

Related Questions

I need to check If a column value (string) in SQL server table starts
I would like a constraint on a SQL Server 2000 table column that is
In SQL Server (2005+) I need to index a column (exact matches only) that
How do you add a string to a column in SQL Server? UPDATE [myTable]
Does anyone know how I would go about concatenating a string in SQL Server
I have a table in SQL Server 2008 with a column having the string
I have a SQL Server 2005 table that has a string column in which
I create an aggregate function for string column in SQL Server 2008. C# code
I would like to use SQL Server xml type as a column type for
I have a column in SQL Server which is blank (empty string). After calling

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.