Using Redis to Optimize MySQL Queries: i somehow missed this post from flickr team describing their use of (app enforced) capped sorted sets in redis as sort of a reduced optimized secondary index for mysql: […] the bottleneck was not in
Using Redis to Optimize MySQL Queries:i somehow missed this post from flickr team describing their use of (app enforced) capped sorted sets in redis as sort of a reduced optimized secondary index for mysql:
[…] the bottleneck was not in generating the list of photos for your most recently active contact, it was just in finding who your most recently active contact was (specifically if you have thousands or tens of thousands of contacts). What if, instead of fully denormalizing, we just maintain a list of your recently active contacts? That would allow us to optimize the slow query, much like a native MySQL index would; instead of needing to look through a list of 20,000 contacts to see which one has uploaded a photo recently, we only need to look at your most recent 5 or 10 (regardless of your total contacts count)!
This is the first time I’m encountaring this approach where a NoSQL database is used not to provide directly the final data (usually in a denormalized format), but rather to optimize the access to the master of data. Basically this is a metadata layer optimizer. Neat!
Original title and link: Using Redis to Optimize MySQL Queries (NoSQL database?myNoSQL)
原文地址:Using Redis to Optimize MySQL Queries, 感谢原作者分享。
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号