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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T20:41:42+00:00 2026-06-08T20:41:42+00:00

What storage type (BTREE, RTREE, HASH) is the best (and why ) for from

  • 0

What storage type (BTREE, RTREE, HASH) is the best (and why) for “from” and “to” to get the fastest result from queries like this:

SELECT `title`, `from`, `to` FROM `table_name`
WHERE @year >= `from` AND @year <= `to`

@year is the parameter to be replaced with a number

and

all numbers (@year, from, to) are float.

  • 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-08T20:41:44+00:00Added an answer on June 8, 2026 at 8:41 pm

    PRIMARY KEY or UNIQUE and covering index will using BTREE will be best for this type of query.

    ALTER TABLE ADD PRIMARY KEY ix1(from, to, title);
    

    or

    ALTER TABLE ADD UNIQUE KEY ix1(from, to, title) USING BTREE;
    

    For covering index you add columns used in where clauses first then columns used in group by the columns used in order by and then columns used in select.

    HASH index is best for EQUAL search and BTREE index is best for range search.

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

Sidebar

Related Questions

I get this erorr: VC++ -- This declaration has not storage class or type
I have an oracle table with a column from type SYS.XMLTYPE and a storage
Here in Apple's sample code I found this type of persistence storage. Can anyone
When I have entity B inherit from entity A using table-per-type for storage and
I was just wondering if a storage engine type existed that allowed you to
Are there any standalone type conversion libraries? I have a data storage system that
I'm tring to modify the default storage engine from InnoDB to MyISAM on a
In this header file, I am getting error: unknown type name uint32, uint16. I
This is the error message from show engine innodb status; when I try to
I keep getting error: no type or storage class may be specified here before

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.