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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:36:43+00:00 2026-05-27T07:36:43+00:00

I will always be entering things of 20 characters into a particular column in

  • 0

I will always be entering things of 20 characters into a particular column in my table.

I need this column to be unique.

Will there be any speed difference in SELECT queries if I set this column to be a varchar(255) instead of varchar(20)?

(data entered will always be 20 characters)

  • 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-27T07:36:44+00:00Added an answer on May 27, 2026 at 7:36 am

    if data entered will always be 20 characters than why not consider using char(20). using varchar(20) will use 20 bytes for storing character and 1 byte for storing length. so if there are 1 million records, 1 million bytes will be wasted.

    as far as speed is concerned between varchar(20) and varchar(255), then I dont think it might be very hard to pick one of them, both of them will be using 21 bytes, I dont see any significant performance benefit or loss of one over other.

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

Sidebar

Related Questions

Are there any guarantees that realloc() will always shrink a buffer in-place?? So that
I have two columns in a table that will always be unique, vendor_identifier and
How do I declare that a symbol will always stand for a particular value
My websocket server will receive and unmarshal JSON data. This data will always be
Is it true that any REST based API to upload videos will always require
Since, guid values will always be unique anyway why use a unique index. Isnt
If a variable will always be a number, is there a performace loss by
I want a textbox which will always applied a Converter on the binding. this
The following formula will always return the value of the 4th column (D) of
This will always print false. How can I check if the date is in

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.