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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:06:16+00:00 2026-06-10T11:06:16+00:00

If I have a MyISAM table with a 3-column index, something like create table

  • 0

If I have a MyISAM table with a 3-column index, something like

create table t (
  a int,
  b int,
  c int,
  index abc (a, b, c)
) engine=MyISAM;

the question is, can the following query fully utilize the index:

select * from t where a=1 and c=2;

in other words, considering that an index is a b-tree, can MySQL skip the column in the middle and still do a quick search on first and last columns?

EXPLAIN does seem to be showing that the index will be used, however, the Extra says: Using where; Using index and I have no idea what this really means.

  • 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-06-10T11:06:17+00:00Added an answer on June 10, 2026 at 11:06 am

    The answer is “no”.

    The MySQL documentation is quite clear on how indexes are used:

    If the table has a multiple-column index, any leftmost prefix of the index can be used by the optimizer to find rows. For example, if you have a three-column index on (col1, col2, col3), you have indexed search capabilities on (col1), (col1, col2), and (col1, col2, col3). (http://dev.mysql.com/doc/refman/5.0/en/mysql-indexes.html.)

    What happens is that the index gets used for “a=1”. All records that match are loaded, to see if “c=2” is true. The filter ends up using a combination of indexes and explicit record filtering.

    By the way, if you want to handle all combinations of two columns, you need several indexes:

    • (a, b, c)
    • (b, a, c)
    • (c, b, a)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a mysql MyISAM table, I have a column type mediumblob and storing captured
I currently have a signed integer set in a MyISAM table, The query is
I have a MyISAM table with ~50'000'000 records (tasks for web crawler): CREATE TABLE
I have a MySQL-table called customers1 running engine MyISAM. I've created a full text
I have the following scenario: I have a database with a particular MyISAM table
I have a MyISAM table with more than 10^7 rows. When adding data to
Say you have a MySQL 5.0 MyISAM table with 100 million rows, with one
I have table with 300 000 records (MyISAM). I get record from this table
I have a column in my table which is of type text . The
I have a MyISAM table that basically contains a log. A cluster of machines

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.