Redis vs Mysql engine type memory
memory, mysql, performance, redis
Solution
For autocomplete lists (with a startswith or wildcard search), Redis on its own isn't your best bet. I recently added some functionality to Redis to accomplish this (well, the startswith bit). See the pull request here.
If you want to jump on the NoSQL wagon, an integrated solution like ElasticSearch or SOLR is worth looking into. They use Redis as a backend, and provide sophisticated tokenisation and natural language detection (Lucene and the likes).
Using an object mapper, like (python examples here) Josiah Carlsons's rom or Luca Sbardella's stdnet, is also an option. They store the data in such a way that simple queries can be executed in Redis using automated Lua scripting.
If you prefer to stick with SQL, there is nothing wrong with using a relational database like MySql or Postgres. Especially with such a small amount of rows.
Hope this helps, TW
Problem
I would like to know if anyone has had experience with these search engines, I'm at about 2500 records consisting of id and name (id-> 5 ....... name-> city, state) in a table, that is read-only and almost never change, if I select mysql, I think to use: select id, name from cities where name like '%text%' and name like '%othertext%'; ... one like, for each word, or maybe Redis, what option is more suitable for this case? is an autocomplete for a website and exist cities whit long names and several words per name.