Number of mysql columns

Asked 2 years ago, Updated 2 years ago, 30 views

Hi, everyone. I am currently designing a DB

The number of columns in a table is likely to easily exceed 400.

As far as I know, the number of max columns is thousands, so I don't think it'll matter

What are the most serious disadvantages of increasing the number of columns?

Also, isn't there a big problem with the service at most?

mysql

2022-09-22 12:26

1 Answers

We recommend that you do not use the following QUERY first.

SELECT * FROM ...

In addition to the examples you asked, it is often inefficient to get all the columns as above. It is recommended that only the required columns be specified and imported.

This is because, even if not in use, all columns of data are transmitted in the communication between the database and the inflation.

After some data accumulation, INSERT and UPDATE are concerned about performance degradation.

If the dataset is small, it doesn't look like a big problem.

In the future, if you are considering that your data will grow larger, it would be better to normalize it. Think about dividing it into multiple tables if necessary through regularization.


2022-09-22 12:26

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.