I have used Ruby, Sinatra framework to implement a web-service API. Used MYSQL for db connection and query. My ruby code interacts with active record model and fetch records from db.
My database is a dynamic db which grows very fast and updates records very frequently, where I cant use any cache.
Currently, in my database, single table contains more than 500k records. which takes too much time to execute a select query and fetch records from table(containing 500k records which might grow even bigger).
This results and impacts badly on my API (get request). Taking around half an hour to process the API which is a big impact on API performance.
Can anyone please suggest me what tools or any efficient ways to make my API faster.