Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Advanced MySQL 8
Advanced MySQL 8

Advanced MySQL 8: Discover the full potential of MySQL and ensure high performance of your database

Arrow left icon
Profile Icon Vanier Profile Icon Shah Profile Icon Malepati
Arrow right icon
€18.99 per month
Full star icon Full star icon Half star icon Empty star icon Empty star icon 2.8 (5 Ratings)
Paperback Jan 2019 286 pages 1st Edition
eBook
€17.99 €26.99
Paperback
€32.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Vanier Profile Icon Shah Profile Icon Malepati
Arrow right icon
€18.99 per month
Full star icon Full star icon Half star icon Empty star icon Empty star icon 2.8 (5 Ratings)
Paperback Jan 2019 286 pages 1st Edition
eBook
€17.99 €26.99
Paperback
€32.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€17.99 €26.99
Paperback
€32.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Advanced MySQL 8

MySQL 8's New Features

In this chapter, we will not only cover all the new exciting features of MySQL 8.0, but we will also review its deprecated or removed features as well, and learn about its functionality.

The following are the topics that we will discuss:

  • Global data dictionary
  • MySQL support roles and history
  • Creation and management of resource groups and permissions
  • InnoDB enhancements
  • JSON functionality enhancements
  • Invisible indexes from MySQL optimizer
  • Features deprecated in MySQL 8.0
  • A quick look at the features removed from MySQL 8.0
  • A review of the chapter

Now let's take a look at the main reasons Oracle has gone so far with its development of the global data dictionary in MySQL 8.0.

Global data dictionary

In an optimization strategy, to be able to obtain an ideal optimization of MySQL, it is essential to have an understanding of the operation in the backend, to be able to make the right adjustments.

It's like when you bring your vehicle to the garage to check an abnormal sound. A competent mechanic will be able to give you good recommendations and do the right thing to correct the situation because he knows how the engine works, and it is the same with MySQL and optimization.

MySQL, like any other database, needs somewhere to store its schema names, table definitions, and other metadata; these are most commonly stored in a combination of different locations, including .FRL, .PAR, .OPT, .TRN, and .TRG files. This has gradually become a bottleneck in various contexts over time.

A visual example of files external to MySQL tables can be seen in the following...

MySQL 8's support roles and history

In MySQL 8, there is one new feature that is well worth a special mention. Right on the MySQL server, you can now create roles, specify their privileges, and assign them to users. So, from now on, it will be an easy task for you because you will not need to remember which permissions a team X programmer needs, and whether a team QA must have Z privileges, and so on.

Let's take a concrete example:

To create a role, just run following command:

CREATE ROLE 'devops_developer', 'app_read', 'app_write';

Now give privileges to the role:

GRANT SELECT ON app_db.* TO 'app_read';

And, finally, share this role with a user:

GRANT 'app_read' TO 'read_username1'@'localhost', 'read_username2'@'localhost';

The other options available are as follows:

  • Mandatory...

MySQL 8 supports the creation and management of resource groups and permissions

A new feature that Oracle has added to MySQL 8.0 is the creation and management of resource groups that can assign threads to particular groups so that these threads run according to the resources available to the group.

Group attributes allow you to control resources to vary resource consumption by group threads as needed. DBAs can adapt them to different workloads.

Currently, the use of the CPU is a manageable resource—yes, you read it right, manageable; this use is represented by the concept of virtual CPU or CPU cores. At start-up, an assessment is carried out by the MySQL server as to the number of available virtual processors. DBAs, depending on their privilege, can then associate them with resource groups and assign threads.

This means that you can assign a group 2 virtual CPU to application...

InnoDB enhancements

In MySQL 8.0, Oracle has improved or added features; let's look at these.

This step in MySQL is something many DBAs or developers are not aware of, because it is not something that we check everyday but it is important; we're talking about the maximum value of the auto-increment counter, which is registered in the redo log and changes each time during each checkpoint.

In addition to being saved in a series of private tables and visible only by MySQL, the auto-increment counter has been improved so it is more persistent during a restart of MySQL. This means that during a reboot, the new value will persist and not change as in previous releases.

Another improvement is the dynamic configuration of Innodb_deadlock_detect, which can be used to disable or enable this variable, which normally if it is active can affect the performance of MySQL in the case...

JSON enhancements functionalities

Oracle has been forced over time to adopt the new NoSQL trend because of the competition and also the fact that the concept of storage type document as JSON came to be much more practical at the management level; for some companies that have architectures such as big data, this became more of a constraint at the application level.

For these reasons, Oracle introduced for the first time in MySQL 5.7.8, the JSON data type, which is a type of specialized binary column, similar to a blob, but with additional features to optimize storage and recover the values of a JSON type column.

In the new version of MySQL 8.0, Oracle has added great features such as automatic validation, JSON document normalization, and automatic loading of values. There is also a restriction that must be taken into consideration, such as, for example, JSON columns that cannot...

Invisible indexes from MySQL optimizer

You read that correctly—indexes can now be made invisible in MySQL 8.0!

From a performance or optimization point of view, this new MySQL 8.0 option is appreciated because you can essentially disable an index before deleting it. When you create an invisible index, it is always maintained normally, but the optimizer will not see it.

In other words, if you're not sure whether you need an index, you can mark it as invisible and the MySQL optimizer will not use it. After monitoring your server and monitoring performance, you can decide to reactivate it if you think that will result in improved performance.

As you probably already know, when the query optimizer can find an action plan to exploit them to their fullest, indexes can be of great assistance. They reduce execution time and improve the performance of your queries. However...

Features deprecated in MySQL 8.0

Like all new MySQL versions, the following features are considered obsolete in MySQL 8.0, and may be removed in a future new release. When alternatives are displayed, applications must be updated to use them.

Since MySQL 8.0.4, the validate_password plugin has been re-enabled for use in the server component framework, and although it is still available, there are plans for it to be removed from future versions of MySQL.

The ALTER TABLESPACE and DROP TABLESPACE ENGINE clause will be removed from future releases.

The function JSON_MERGE () is removed from MySQL 8.0.3. You should use JSON_MERGE_PRESERVE () instead.

A quick look at the features removed from MySQL 8.0

It is important to note that the following items are obsolete and have been removed in MySQL 8.0. When messages are displayed for alternatives, applications must be updated to use them and the following is only a short list of all removed items. I invite you to visit MySQL website for more details:

  • The information_schema_stats configuration has been replaced by information_schema_stats_expiry.
  • InnoDB system views have been replaced:
  • The query cache has been removed, including FLUSH QUERY CACHE and RESET QUERY CACHE.
  • Two MySQL storage engines currently provide native partition support: InnoDB and NDB. Of these, only InnoDB is supported by MySQL 8.0. Any attempt to create partitioned tables in MySQL 8.0 using another storage engine will fail.
  • In MySQL 8.0, the data_locks table and sys schema views contain separate schema name...

Summary

In this chapter, we have covered all the new exciting features of MySQL 8.0 and their functionalities, and reviewed deprecated and removed features. We have seen the main reasons why Oracle has gone so far with its development of the global data dictionary in MySQL 8.0.

We covered MySQL support roles and history; we covered one new feature on the MySQL server, in which you can now create roles, specify their privileges, and assign them to users. We learned that a new feature that Oracle has added to MySQL 8.0 is the creation and management of resource groups; we can assign threads to particular groups so that these threads run according to the resources available to the group. We also looked at enhancements in InnoDB and JSON, and we learned about invisible indexes from MySQL's optimizer. Lastly, we looked at features that have been deprecated and removed from MySQL...

Left arrow icon Right arrow icon

Key benefits

  • Explore the new and advanced features of MySQL 8.0
  • Use advanced techniques to optimize MySQL performance
  • Create MySQL-based applications for your enterprise with the help of practical examples

Description

Advanced MySQL 8 teaches you to enhance your existing database infrastructure and build various tools to improve your enterprise applications and overall website performance. The book starts with the new and exciting MySQL 8.0 features and how to utilize them for maximum efficiency. As you make your way through the chapters, you will learn to optimize MySQL performance using indexes and advanced data query techniques for large queries. You will also discover MySQL Server 8.0 settings and work with the MySQL data dictionary to boost the performance of your database. In the concluding chapters, you will cover MySQL 8.0 Group Replication, which will enable you to create elastic, highly available, and fault-tolerant replication topologies. You will also explore backup and recovery techniques for your databases and understand important tips and tricks to help your critical data reach its full potential. By the end of this book, you’ll have learned about new MySQL 8.0 security features that allow a database administrator (DBA) to simplify user management and increase the security of their multi-user environments.

Who is this book for?

Advanced MySQL 8 is for database administrators, data architects, and database developers who want to dive deeper into building advanced database applications in the MySQL environment.

What you will learn

  • Explore new and exciting features of MySQL 8.0
  • Analyze and optimize large MySQL queries
  • Understand MySQL Server 8.0 settings
  • Master the deployment of Group Replication and use it in an InnoDB cluster
  • Monitor large distributed databases
  • Discover different types of backups and recovery methods for your databases
  • Explore tips to help your critical data reach its full potential

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jan 31, 2019
Length: 286 pages
Edition : 1st
Language : English
ISBN-13 : 9781788834445
Vendor :
Oracle
Category :
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Jan 31, 2019
Length: 286 pages
Edition : 1st
Language : English
ISBN-13 : 9781788834445
Vendor :
Oracle
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 107.97
Advanced MySQL 8
€32.99
MySQL 8 Cookbook
€41.99
MySQL 8 Administrator???s Guide
€32.99
Total 107.97 Stars icon

Table of Contents

12 Chapters
Introduction Chevron down icon Chevron up icon
MySQL 8's New Features Chevron down icon Chevron up icon
Indexing Your Data for High Performance Chevron down icon Chevron up icon
Advanced Data Techniques for Large Queries Chevron down icon Chevron up icon
MySQL Data Dictionary in MySQL 8.0 Chevron down icon Chevron up icon
MySQL Server Settings Chevron down icon Chevron up icon
Group Replication in MySQL 8.0 Chevron down icon Chevron up icon
InnoDB Cluster in MySQL 8.0 Chevron down icon Chevron up icon
Monitoring Your Large Distributed Databases Chevron down icon Chevron up icon
Authentication and Security Management with MySQL 8.0 Chevron down icon Chevron up icon
Advanced MySQL Performance Tips and Techniques Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Half star icon Empty star icon Empty star icon 2.8
(5 Ratings)
5 star 40%
4 star 0%
3 star 0%
2 star 20%
1 star 40%
DjjZ Sep 18, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
One reviewer said this book was not very advanced and had a whole section on indexing, and who needs that? Well, I do. That is what convinced me to buy it. I have years of experience with a large application my company developed, and it still uses FoxPro, where I have tons of experience with indexing. But we are migrating to MySQL, and the chapter on indexing is exactly what I need. It will help me make the leap. I need to see how indexing in MySQL is different from FoxPro.
Amazon Verified review Amazon
Amazon Customer Jun 27, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Excellent book. Book explaining the advanced concepts in a very easy way, best thing in this book is you can cover the whole book within 1 week and every page will give you a fresh knowledge.There are exercises in each chapter to make sure you are learning the topics. This review can be helpful for others to take this book.Highly recommended.
Amazon Verified review Amazon
Knowledge Sponge Jul 21, 2019
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
I was looking for a book that would get me up to speed on the new capabilities of MySQL 8. This isn't it. It barely describes the new features, and doesn't even mention some major ones such as windowing. It is primarily about how to organise a database - indexes, replication, performance and so on. And it isn't very "advanced" - it has a section about why you should create indexes. If someone doesn't know that, they don't need an "advanced" book. I guess it's "advanced" as in "not for the person who only started using MySQL yesterday". It's probably an OK book at that level (though I didn't like the style, which I found patronising), just not what it claims to be from the title.
Amazon Verified review Amazon
Fran G. Mar 18, 2021
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
Focus is placed on differences from last version.
Amazon Verified review Amazon
martin yuk Dec 30, 2020
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
information of mysql is very basic
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.