, there will be a column called user_no.
Connect with LEFT JOIN to retrieve all information at once
Extract information for each table
Which is faster?
I ’m sorry for the poor explanation.
Answer # 1
Create a CREATE TABLE statement, a CREATE INDEX statement, and a SELECT statement that can execute it in a question. By checking the execution plan, you can determine whether it is roughly efficient SQL.
Don't forget to measure the processing time.
Answer # 2
When the same value for user_no exists in all tables
It may not make sense to normalize.
On the other hand, when it is in a state where it is impossible to predict which table has what
select user_no from user_data1It is reasonable to create a list of user_no in
union select user_no from user_data2
union select user_no from user_data3
union select user_no from user_data4
and then left join sequentially
If user_no is not unique, data is obtained by join
Please carefully scrutinize the operation method as it is likely to become enlarged
- about mysql user
- about data registration from php to mysql
- about mysql logical erase
- about output method in case of complicated condition of mysql
- About MYSQL you need to know the data type and operation data table
- about pdo connection of php and mysql made with docker-compose
- about mysql connection in eclipse
- mysql - about writing the python3 tkinter database
- about mysql insert error
- windows 10 - about mysql installation
- mysql - it is a question about resolving the difference between the rails migration file and the local db
- mysql - query takes about 10 minutes if you join the join clause in sql
- mysql - about record extraction conditions
- about information_schema of mysql
- about installing 32-bit version of mysql on 64-bit pc
- about mysql sub-inquiries
- mysql - about docker container startup error
- mysql - about db table naming
- about mysql innodb unique constraints and concurrent insert
- about error connecting nodejs application and mysql
- python 3x - typeerror: 'method' object is not subscriptable
- python - you may need to restart the kernel to use updated packages error
- xcode - pod install [!] no `podfile 'found in the project directory
- vuejs - [vuetify] unable to locate target [data-app] i want to unit test to avoid warning
- android studio - emulator: dsound: could not initialize about the error message directsoundcapture
- android studio - unresolved reference comes out in kotlin
- mysql startup failed [error] innodb: the innodb_system data file 'ibdata1' must be writable
- django - oserror: [winerror 123] the file name, directory name, or volume label syntax is incorrect : '<frozen importlib_boot
- python - importerror: cannot import name md5 error cannot be resolved