Redis vs Mysql - engine type memory

I would like to know if anyone had experience with these search engines, I have about 2500 entries consisting of an identifier and a name (id-> 5 ....... name-> city, state) in a table, which is read-only and almost never changes if I select mysql, I think to use: select id, name from cities where the name is like “% text%” and the name is like “% othertext%”; ... one, for example , for each word or maybe for Redis, which option is suitable for this case? is autocomplete for the website and there are cities with long names and a few words for the name.

+4
source share
1 answer

For autocomplete lists (using search at the beginning or a wildcard), Redis itself is not the best choice. I recently added some Redis functions to accomplish this (well, the startswith bit). See Traction Request here .

If you want to upgrade to NoSQL wagon, consider an integrated solution such as ElasticSearch or SOLR. They use Redis as a backend and provide sophisticated Marxization and natural language detection (Lucene and the like).

Using a mapper object, for example (python examples here) Josiah Carlsons rom or Luca Sbardella stdnet , is also an option. They store data in such a way that simple queries can be executed in Redis using automated Lua scripts.

SQL, , MySql Postgres. .

, , TW

+4

Source: https://habr.com/ru/post/1534101/


All Articles