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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:29:49+00:00 2026-05-18T21:29:49+00:00

I have a relatively large database (130.000+ rows) of weather data, which is accumulating

  • 0

I have a relatively large database (130.000+ rows) of weather data, which is accumulating very fast (every 5minutes a new row is added). Now on my website I publish min/max data for day, and for the entire existence of my weatherstation (which is around 1 year).

Now I would like to know, if I would benefit from creating additional tables, where these min/max data would be stored, rather than let the php do a mysql query searching for day min/max data and min/max data for the entire existence of my weather station. Would a query for max(), min() or sum() (need sum() to sum rain accumulation for months) take that much longer time then a simple query to a table, that already holds those min, max and sum values?

  • 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-18T21:29:50+00:00Added an answer on May 18, 2026 at 9:29 pm

    That depends on weather your columns are indexed or not. In case of MIN() and MAX() you can read in the MySQL manual the following:

    MySQL uses indexes for these
    operations:

    To find the MIN() or MAX() value for a
    specific indexed column key_col. This
    is optimized by a preprocessor that
    checks whether you are using WHERE
    key_part_N = constant on all key parts
    that occur before key_col in the
    index. In this case, MySQL does a
    single key lookup for each MIN() or
    MAX() expression and replaces it with
    a constant.

    In other words in case that your columns are indexed you are unlikely to gain much performance benefits by denormalization. In case they are NOT you will definitely gain performance.

    As for SUM() it is likely to be faster on an indexed column but I’m not really confident about the performance gains here.

    Please note that you should not be tempted to index your columns after reading this post. If you put indices your update queries will slow down!

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

Sidebar

Related Questions

I have a relatively large database tables (just under a million rows) that has
I have a large database (potentially in the millions of records) with relatively short
I have a need to run a relatively large number of virtual machines on
I have a relatively simple form which asks a variety of questions. One of
I'm a database noobie when it comes to even moderately large data sets. I
I have a relatively simple site that I'm working up for an intranet environment.
We have are relatively simple Reporting Services report that our users commonly export to
I have a relatively complex .htaccess file to control page requests, this currently redirects
I have a relatively simple select statement in a VB6 program that I have
In an ASP.NET 3.5 site we have a relatively standard payment checkout progess that

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.