Ruby on Rails: Best way to save search queries in a database

Posted by Adam Templeton on Stack Overflow See other posts from Stack Overflow or by Adam Templeton
Published on 2012-12-11T22:49:09Z Indexed on 2012/12/11 23:03 UTC
Read the original article Hit count: 136

Filed under:
|
|
|

For a RoR app I'm helping develop, I need to save all search queries in a database so I can analyze them later.

My plan right now is to create a Result model and table, and just save each search query's text in that table, along with a user's ID, the time, etc.

However, the app has about 15,000 users, so I'm afraid the single table approach won't be super efficient when it comes time to parse that data. (The database is setup via MySQL, if that factors in at all.)

Am I just being paranoid? Is there a Ruby gem that handles this sort of thing, or a better approach I could take?

Any input would be appreciated.

© Stack Overflow or respective owner

Related posts about mysql

Related posts about ruby-on-rails