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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T14:14:43+00:00 2026-05-12T14:14:43+00:00

I’m trying to speed up SELECT queries in MySQL tables which already have some

  • 0

I’m trying to speed up SELECT queries in MySQL tables which already have some indexes. Hopefully without significant impact on frequent INSERT INTO queries running at the same time (by other clients). The tables have millions of entries and have already passed the Gigabyte size (they have a BLOB field).

The tables have a pair of fields describing a contiguous interval (can be a time interval in microseconds, or a number of execution, or version, or whatever). These two fields are indexed; I have two indexes, one for only one of the fields (when I query on it), and another for both fields (which can also appear on many queries).

Two other candidate indexes come from an identifier (for example, filename), since it’s commonly used in queries as well.

A colleague proposes that we incorporate the identifier in the two previous indexes. However, I have the feeling it makes more sense to have a separate key. I’m preparing a test to ascertain which is the better option, but I expect it will take a couple of days. In the meantime, I’m looking for past experiences and/or advice in regard to this.

So my questions are:

  1. Which is ideal, create a new index for the identifier? Or incorporate it in the interval index? I.e., many identifiers can have the same interval, and many intervals can have the same identifier.
  2. Which of the two options should consume more disk space, especially in multi-million-row tables? I believe the “faster” one, whichever it will be, will be also the most space-consuming.
  3. I don’t know whether creating the new index (for example, the separate index option) solves nothing or is of little help. What are your past experiences on this or similar situations? Any advice/documentation I can research specifically on this subject?
  • 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-12T14:14:43+00:00Added an answer on May 12, 2026 at 2:14 pm

    Determining which indexes to define for a table depends on a lot of factors. One of the most important of them is what queries exactly you want to run.

    In this case, without knowing the table structure and exactly how the queries you want to include the identifier in work, it is hard to say how to build the indexes.

    Keep in mind that MySQL has a one index per query limit. This means that the query optimizer will only use one index (if at all) for any given table at a time.

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I have just tried to save a simple *.rtf file with some websites and
I have a text area in my form which accepts all possible characters from
I am trying to loop through a bunch of documents I have to put
I have some data like this: 1 2 3 4 5 9 2 6
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
I have a jquery bug and I've been looking for hours now, I can't

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.