All threads / Multi tenant - will it help?

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Multi tenant - will it help?

Ohad Dahan asked in Databases

Here is the case , I got users and a few other models , most of them end up doing some action with one main table that contains around 15M rows.

I have an indexed foreign key between the main table and the user model , and plently of specific columns indexes to speed up various queries.

I recently added an Ajax-DataTable view which queries this table for each change , this caused a huge bottleneck in the application.

I think this is happening due to too many calls using the same table.
I'm thinking of migrating the existing application to a multi-tenant strucutre , where each user will have its own main table.
Thus having less locks on the same table.

Anyone have any expirience with anything similar?

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 33,665+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.