PingCAP
  • Cloud
  • TiDB Academy
  • Docs
  • Success Stories
  • Blog
  • Free Download
PingCAP
  • Cloud
  • TiDB Academy
  • Docs
  • Success Stories
  • Blog
  • Free Download

Contact

中文
  • TiDB Academy
  • avatar
  • Academy Profile
  • Sign Out
  • Introduction:
    • Course Overview
    • Format and Housekeeping
    • Setting up Google Cloud Platform
    • Introduction to Distributed Databases
  • TiDB Overview:
    • TiDB Platform
    • Optional Components: TiSpark
    • The KOST Stack
    • Lab: Deploying TiDB Platform on GKE
    • Recap: Deploying TiDB Platform on GKE
  • MySQL Compatibility:
    • Overview
    • Behavior Differences
    • Default Differences
    • Lab: Loading Sample Data
    • Recap: Loading Sample Data
  • Query Optimization:
    • Overview
    • EXPLAIN
    • Lab: Optimize Queries
    • Lab Recap: Optimize Queries
    • The Coprocessor
  • HTAP:
    • Overview
    • TiDB + Apache Spark
    • Lab: HTAP
    • Lab Recap: HTAP
  • Backup and Restore:
    • Overview
    • Lab: Restore from Accidental Delete
    • Lab Recap: Restore from Accidental Delete
    • Lab: Backup and Restore
    • Lab Recap: Backup and Restore
  • Schema Changes:
    • Overview
    • Google's F1 DDL Algorithm
    • Lab: ALTER TABLE online
    • Lab Recap: ALTER TABLE online
  • Scaling the TiDB Platform:
    • Overview
    • Scaling Patterns
    • Lab: Scaling TiDB
    • Lab Recap: Scaling TiDB
    • Placement Driver
  • Updates, Upgrades and Migrations:
    • Overview
    • Updates
    • Upgrades
    • Migration from MySQL
  • Data Migration (DM):
    • Overview
    • Example Usage
  • RocksDB:
    • Overview
    • Architecture
  • Monitoring and Observability:
    • Overview
    • Observability
    • Lab: Prometheus and Grafana
    • Lab Recap: Prometheus and Grafana
  • Conclusion:
    • Course Summary
    • Shutdown your TiDB Cluster
    • What's Next?

Upgrades

Transcript

Upgrades are often less time sensitive or critical than updates.

Rather than the motivation being security updates as it is with updates, an upgrade is more forward looking and strategic. The motivation could be for improved compatibility with MySQL, performance enhancements, or an entirely new feature.

In the case of TiDB, you may be planning your upgrade from TiDB 2.0 to 2.1.

Using this as an example, an upgrade to 2.1 would bring you:

  • A number of performance enhancements such as a “fast-path” optimization for point lookup queries. For very simple queries, TiDB skips large parts of its optimizer and the co-processor and just retrieves records directly from TiKV, improving performance by up to 40%.
  • Improvements for analytics queries, such as improved parallel execution.
  • Experimental support for table partitioning.

In most cases, upgrades are a safe and straight forward process. But if you come from a Database Administration background, you probably know it is better to play safe and not rush into an upgrade.

From my experience working on the MySQL Server, the most typical upgrade related issue that I encountered was regressions in query optimization. Because SQL is declarative (as we covered earlier in query optimization), it doesn’t actually instruct how the query should be executed. And while this makes it easier for newer versions of the software to introduce performance improvements, there are edge cases.

It is not unheard of for a new query optimization to make a certain type of query much faster, but also incorrectly be applied in scenarios which make queries slower.

If you have an application that is particularly sensitive to performance regressions, you may want to look at evaluating your upgrade with the help of some third party tools. I will talk about these in more detail in our next video, on migration.

Product

  • TiDB
  • TiSpark
  • Roadmap

Docs

  • Quick Start
  • Best Practices
  • FAQ
  • TiDB Tools
  • Release Notes

Resources

  • Blog
  • Weekly
  • GitHub
  • TiDB Community

Company

  • About
  • Careers
  • News
  • Contact Us
  • Privacy Policy
  • Terms of Service

Connect

  • Twitter
  • LinkedIn
  • Reddit
  • Google Group
  • Stack Overflow

© 2019 PingCAP. All Rights Reserved.

中文