Answer the question
In order to leave comments, you need to log in
How will the database run faster?
There is a table in a DB in which 15 columns. This table has 7 columns that will definitely be repeated. I think it's worth moving these 7 columns to a separate table + adding a column with a unique ID to both tables. The problem is that when writing to the second database, you first need to check 5 out of 7 columns for a match, and then add a new record, and in the first case we just add a new record + assign a unique ID + write the same ID to the first table.
As a result:
In the first case, we will have many repetitions, but there will be no extra requests to the database.
In the second case, there will be no repetitions, but there will be an order of magnitude more actions.
How will the database work more correctly and faster?
Answer the question
In order to leave comments, you need to log in
How will the database work more correctly and faster?use 3 nf
How will the database work more correctly and faster ?denormalize
habrahabr.ru/post/193756
it is hard to believe that performance issues can be higher than issues of logical data integrity, and that in this case they generally take place and cannot be solved by improving the query plan, for example, using indexes.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question