Перейти к содержимому

The innocent-looking query that slowed down our database

Tideways

0:00 / 0:00

The innocent-looking query that slowed down our database

317 просмотров · 1 мес. назад
Tideways
1,09 тыс. подписчиков
317 просмотров · 1 мес. назад
Try our PHP Profiler: https://tideways.com/profiler/feature... Subscribe to my newsletter for PHP performance content: https://tideways.com/newsletter?utm_s... In this video, I explain why a simple UPDATE statement for a last_seen timestamp can become a surprising performance bottleneck as your PHP application grows, and share two practical patterns to avoid unnecessary database load. Blog post: https://tideways.com/profiler/blog/up... Chapter 00:00 Introduction 00:38 A SQL query that is unexpectedly slow 03:02 Strategy 1: Update only every few minutes 06:43 Strategy 2: Use Redis to cache and then synchronize timestamps 09:48 Before-and-After Comparison 12:35 Conclusion