Hacker News new | ask | show | jobs
by tmikaeld 1469 days ago
> Traditional databases would compute the results of this query from scratch every time it was issued.

Is this really the case that queries can't be cached on traditional databases?

2 comments

ReadySet PM here - depends on if there are writes to the table or not!

For example, MySQL deprecated their query cache, but previously it would only cache until there were any writes to the tables that the queries were referencing https://dev.mysql.com/doc/refman/5.7/en/query-cache-configur...

I was just looking this up and it's correct, they don't cache queries (if they do, it's a separate feature), they only manage query planning in ways that make them faster.

Even CochroachDB doesn't do query cache, only query planning is cached. [0] [1]

[0] https://www.cockroachlabs.com/blog/memory-usage-cockroachdb/

[1] https://www.cockroachlabs.com/blog/query-plan-caching-in-coc...