0

I have complicated query (some joins and ordering), that I want to execute very often. Results of query can change very rarely.

Query gets words form given language and category sorted by frequency, so it have two parameters - language and category.

I heart about materialized views, or databases in memory, bu I do not have experience enough to consider cons and props in reasonable way.

I want to have possibility execute this query for these parameters, and next not execute it until I decide manually, that it must be refreshed. In practice, all application based on executing this query many times, so I do not know if can I create one view in memory, when database use innodb.

I can change mysql on something else, and innodb too if is it recommended.

Daniel
  • 209
  • 1
  • 3
  • 10

1 Answers1

1

Let's try the Query cache first. Add these to my.cnf, then restart mysql:

query_cache_type = ON
query_cache_size = 50M

If that does not work adequately, we can discuss alternatives.

Rick James
  • 80,479
  • 5
  • 52
  • 119