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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:40:26+00:00 2026-06-01T19:40:26+00:00

After reading How MySQL Uses Indexes i was left with a doubt: is there

  • 0

After reading How MySQL Uses Indexes i was left with a doubt:
is there benefit in turning column A and column B into indexes, in case they will be summed in most of my queries?

My question is mostly because the above link lists MIN and MAX functions, as well as COUNT() and they belong to the same group as SUM (aggregate functions):

http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html#function_sum

  • 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-01T19:40:28+00:00Added an answer on June 1, 2026 at 7:40 pm

    You use indexes to help find stuff. So you need that in columns that you use in the where clauses and in joins and in order/group by. Once you have the rows you want, that is when you start counting and summing and then indexes won’t help.

    So if the columns are used in the select: no

    In where or join: yes

    In order/group by: possibly.

    PS: For select min()/max() on all rows on a table, indexes help cause you don’t have to scan the table but find it directly. The same does not apply to sum.

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

Sidebar

Related Questions

After reading around, I've realized that SQL ( MySQL in my case ) does
After reading the documentation for MySQL Workbench I got the impression that it's possible
So after reading Performance in PDO / PHP / MySQL: transaction versus direct execution
I am not a MySQL expert by any means, but after reading the documentation
I have found a proper solution to my problem but even after reading mysql
After reading a bit on Javascript's prototypical inheritance model , I change my style
After reading Dynamically calling unmanaged dlls in .net I've been trying to modify the
After reading this post I kinda felt in the same position as the guy
After reading this article on thedailywtf.com, I'm not sure that I really got the
After reading the wikipedia article on WPF architecture, I am a bit confused with

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.