In MySQL, historically GROUP BY was used to provide sorting as well. If a query specified GROUP BY, the result was sorted as if ORDER BY was present in the query.
mysql-5.7> CREATE TABLE t (id INTEGER, cnt INTEGER);
Query OK, 0 rows affected (0.03 sec)
mysql-5.7> INSERT INTO t VALUES (4,1),(3,2),(1,4),(2,2),(1,1),(1,5),(2,6),(2,1),(1,3),(3,4),(4,5),(3,6);
Query OK, 12 rows affected (0.02 sec)
Records: 12 Duplicates: 0 Warnings: 0
mysql-5.7> SELECT id, SUM(cnt) FROM t GROUP BY id;
| id | SUM(cnt) |
| 1 | 13 |
| 2 | 9 |
| 3 | 12 |
| 4 | 6 |
4 rows in set (0.00 sec)
MySQL here implicitly sorts the results from GROUP BY (i.e.…
For some time, there have been several requests to the MySQL dev team to add dedicated support for an admin to connect to the MySQL server. We received a contribution from Facebook, bug#90395 , to add this functionality, which we then paired with more requirements, implemented in WL#12138 and delivered in MySQL Server 8.0.14.…
Before the implementation of WL#11652 in MySQL 8.0.13 , the MySQL server listened to incoming connection requests either on one or all configured network interfaces.
However, in case the underlying platform supports several network interfaces it might be useful to allocate more than one network interface for specific use, and therefore allow specifying bind-address for several network interfaces.…
In this post we describe MySQL connections, user threads, and scaling. We hope that an increased understanding of how MySQL works will help application developers and system administrators to make good choices and trade-offs. We describe how connections work in a plain community server and we do not cover related topics such as thread pooling, resource groups, or connection multiplexing in this post.…
ROLLUP has been supported in MySQL for sometime now. But until now its use has come with two implementation restrictions: it cannot be combined with DISTINCT or ORDER BY in the same query expression. Starting in 8.0.12, these limitations have been lifted.…
At MySQL we love opportunities to interact with our users and MySQL User Camp gives us the chance to do just that. The first MySQL User Camp of this year was held on February 13th 2019 at the Oracle Kalyani Magnum Office.…
In this article, let us look at the new storage format of compressed large objects (compressed LOB or ZLOB). In my previous article MySQL 8.0: InnoDB Introduces LOB Index For Faster Updates, I have explained about the new storage format of uncompressed LOBs. …
In 8.0, we introduced window functions in the MySQL server. A detailed explanation of how window functions can be used and what is supported in 8.0 is explained here.
Now, let’s see what is new in window functions in the latest version 8.0.…
In a previous blog post, we discussed how the initialization and restart of the MySQL server has changed between versions 5.6, 5.7 and 8.0. Now, we will take a closer look at MySQL 8.0 to explain in more detail how the transactional data dictionary is bootstrapped.…