With Data being cached so often now and the database is only being accessed when there is new data (and then that data is cached lol) is there even a real performance difference for using Int primary keys vs UUID primary keys.
For example, lets assume im building NetFlix. A new movie gets added to the database, and the movie listing along with associated data is put into a cache.
The user search’s for a movie (a search server handles this), then finds a listing, clicks on it and the data is retrieved from the cache.
In this entire process the database is never read.
What are your thoughts?
I am the architect a major site similar to Netflix and you are for the most part correct, almost all non-transactional data is cached so optimizing databases ad nauseum does not always pay off. All of our movie titles are pre-loaded into memcached by a recurring task, so for the library portion of the system, the database is never hit by an actual customer.
Still, we don’t slouch when designing the database structure and queries because we want the preloader to run as fast and efficiently as possible.