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

  • Home
  • SEARCH
  • 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 4105432
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T21:14:45+00:00 2026-05-20T21:14:45+00:00

I am using indexes with my tables, but I honestly do not know how

  • 0

I am using indexes with my tables, but I honestly do not know how they work internally.

Let’s say I have the following table

id age
1  20
2  35
3  19 
4  18

if I make an index of ‘age’, how does mysql organize the rows? Does it organize depends on field type? or…? how does mysql make indexes for unicode??

  • 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-20T21:14:46+00:00Added an answer on May 20, 2026 at 9:14 pm

    MySQL indexes are generally byte-ordered. The first part of the index is the data that is indexed (often the full field, though it can be a partial index of the first few characters), and the second part is the associated primary key.

    For handling unicode, if MySQL is aware, it operates just like comparator classes in other languages. Unicode-aware versions of MySQL have a section of code which is aware of the proper ordering for unicode and can compare two unicode characters telling which one is greater than the other.

    Your resultant index for InnoDB (assuming your PK is id) would be:

    18->4
    19->3
    20->1
    35->2
    

    For MyISAM, an offset reference to the actual row location would be used.

    Also, a good article that might give some insight: http://www.xaprb.com/blog/2006/07/04/how-to-exploit-mysql-index-optimizations/

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

Sidebar

Related Questions

Suppose I have the following tables: CREATE TABLE Game ( GameID INT UNSIGNED NOT
I am using a DBD::SQLite in memory database. I have defined the following indexes
Lets say we have 3 tables (actually I have 2 at the moment, but
I am using PhpMyAdmin to add indexes on the tables but whenever i try
We have a mid-size SQL Server based application that has no indexes defined. Not
THE INFO Currently I have two tables I am working with- a POST table
I am using Fluent-NHibernate (with automapping) to generate my tables but would like to
I'm a complete newbie with MySQL indexes. I have several MyISAM tables on MySQL
Consider the following scenario. I have a table (a stupid_table ) in a schema
Consider the following 2 tables: Table A: id event_time Table B id start_time end_time

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.