Skip to main content

Save the date: Rails World 2024 will take place Sept 26 & 27 in Toronto. More details soon!

  1. World
  2. Agenda
  3. 5th October 2023
  4. Session: Nikita Vasilevsky

Implementing Native Composite primary Key Support in Rails 7.1

Get ready to dive into the world of composite primary keys with the upcoming Rails 7.1 release! This talk will provide a thorough understanding of composite primary keys, the significance of the “ID” concept in Rails, and the crucial role of the “query constraints” feature in making this powerful feature work seamlessly.

We’ll cover the following topics:

The fundamentals of composite primary keys from the database schema perspective What composite primary keys and tenant-based sharding have in common. The advantages of using composite primary keys in multi-tenant applications, including performance gains and security improvements. Real-world scenarios where composite primary keys can be beneficial, along with benchmark comparisons to demonstrate their performance impact. A developer-friendly abstraction to illustrate how data is stored on disk and where performance gains originate. The trade-offs to consider when adopting composite primary keys and the support provided by Active Record for implementing them in Rails web applications.

  • 15:00 - 15:30
  • 5th October 2023
  • Track 1

Session Speaker


Nikita Vasilevsky

Developer, Shopify


Nikita is a Developer at Shopify with more than 6 years of experience. He is an open source contributor with most of the contributions made to the Ruby on Rails framework.


Nikita's Profile Picture