U
U
uuuu2021-06-13 22:30:58
MySQL
uuuu, 2021-06-13 22:30:58

How to calculate more amount?

There are about 700k records in the table, in which there is an integer column where on average 5-6 characters.
Will MySQL be able to calculate their entire sum using the SUM() function? (the sum is greater than 6mlr)
And will MySQL be able to perform any operations with this sum of all rows?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Slava Rozhnev, 2021-06-13
@uuuu

Let's check it with a simple example:

create table t (
  a int
);

insert into t values (2000000000),(2000000000),(2000000000),(2000000000);

select sum(a) * 99 from t;

We get here :
+==============+
| sum(a) * 99  |
+==============+
| 792000000000 |
+--------------+

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question