DEV Community

Discussion on: In RMDBS is join table bad for perfomance ?

Collapse
 
akashkava profile image
Akash Kava

RDBMS(s) are designed to perform better with joins, there are many ways to improve performance. Your boss is neither wrong, nor right, joins do slow down query but that doesn't mean you shouldn't use it. There are various ways to improve joins, create indexes and create indexed views/materialized views.

If User table has only one field then your boss is right, but if User table has more fields such as last_updated, full_name, country, time_zone .. you cannot put these fields in Messages table as it will unnecessary cause lots of duplication and updating all messages to just update last_updated would be slowest thing to do in database.

Collapse
 
scottishross profile image
Ross Henderson

This is a good and simple explanation!