A
A
Alexander2016-10-18 10:25:05
SQL
Alexander, 2016-10-18 10:25:05

Which is better join or duplication?

There was a little strange question, purely theoretical:
There are 2 tables one-to-one;
The selection always comes from table #1, but in filtering (where) it always uses a field from table #2.
What will be used more optimally, join or duplication of the field from No. 2 to No. 1, provided that in table No. 1 (> 1,000,000 rows), and the value by which the filtering occurs will change periodically. (Only SELECT, UPDATE is taken into account, without the overhead of the script)
Well, is the duplication of fields a game, or can such an approach be used?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2016-10-18
@Minifets

What will be used optimally, join or duplication of the field from #2 to #1
You need to check both options on a live database, only then you will get an answer close to reality, because the database optimizer can do anything, depending on the current state.
Well, is the duplication of fields a game, or can such an approach be used?
Denormalization

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question