A passionate full stack software engineer having 7 years of experience in building scalable enterprise systems. I have worked predominantly with the JVM and Javascript ecosystem but currently exploring Rails. For me, software engineering is all about solving problems in the most optimal way. I am an avid practitioner of clean code practices and love to read about System Design and Architectures. When I am not coding I love to play playstation, read anything about aviation or go out for a long drive and of-course I am foodie by heart.
1 minute read
Previously, relation calculations such as count would make a query
even when passed a contradiction,
contradiction relation
means passing an empty array for eg:-
It does not make sense to call a database for such contradictory relations.
Before
So, before Rails 7 was introduced,
the database was called if the relation used for count, sum, average, minimum
and maximum would be contradictory.
As it can be seen,
it would make a query to the database even when passed a contradiction.
After
Now after Rails 7, it avoids making a query to the database.