A rough idea is not to split the table by id, but to divide the table according to specific query fields.
for example, if you need to query the data of a "date", you can divide the table according to the "month". After you know the date, you can naturally figure out what the month is, and you will know to query that table.
for example, if you need to query the data of a "person's name", you can calculate a hash value according to the person's name, and divide the table according to the first 1 or 2 digits of the hash value. If you want to query a person's data, you can calculate the person's name hash value in advance, and you will know which table that person's data is stored in.
I hope I can help you.
first of all, you need to distinguish the relationship between the table and the table, whether it is one-to-many or many-to-many
.
as you said, if you want to check the job title, it must be an one-to-many relationship, and you naturally need a sub-table
.
for example, the fields in main table An are associated with JobId and sub-table B
For
query, you can use LEFT JOIN to associate with sub-tables
thus query its corresponding title