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

The Archive Base Latest Questions

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

Or is MySQL optimized for certain values of n, e.g., powers of 2?

  • 0

Or is MySQL optimized for certain values of n, e.g., powers of 2?

  • 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-29T13:26:43+00:00Added an answer on May 29, 2026 at 1:26 pm

    MySQL keeps extra information about exactly how long the string in a certain VARCHAR field is. It needs either 1 or 2 bytes to store this data. Upto 255 bytes, MySQL will need only 1 extra byte to store the length of the VARCHAR. Above 255, it will use 2 bytes. So there’s one instance where a certain n will matter. But other than that, shorter is much better because MySQL will need to use much more memory when doing things involving this VARCHAR column. Doing things like sorting or operations that use in-memory temporary tables will cost a lot more if you have a VARCHAR(1000) vs VARCHAR(20).

    There is a good few pages that cover this in the Schema Optimization and Indexing chapter of High Performance MySQL from Oreilly.

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

Sidebar

Related Questions

Are there any guidelines to write the optimized queries in MySQL ?
What is the meaning of Select tables optimized away in MySQL Explain plan? explain
mysql> select count(*) from table where relation_title='xxxxxxxxx'; +----------+ | count(*) | +----------+ | 1291958
Mysql: Table_A ------------ id name 1 Name1 2 Name2 Table_B ------------ a_id type value
Mysql's environment is following: character_set_database=big5 And when I send a SQL which contains tranditional
MySQL allows the value of 0000-00-00 for date fields, however ActiveRecord treats an assignment
MySQL connection in PHP can be established in two ways: $mysql = new mysqli('localhost',
mysql> ALTER TABLE category ADD CONSTRAINT category_parent_category_id FOREIGN KEY (parent) REFERENCES category(id); ERROR 1005
MySQL stores the date in my database (by default) as 'YYYY-MM-DD' The field type
Mysql has two types that can hold boolean data, bit and bool. Bit(1) seems

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.