M
M
Marina Mart2020-01-25 23:12:19
MySQL
Marina Mart, 2020-01-25 23:12:19

Will a large number of columns slow down the database?

We implement mysql data collection from ad calendars on a real estate site
There is a proposal 1 to make a database with a large number of objects and more than 370 columns (5 columns with different data and 365 columns for each day of the year - a calendar with Y / N records for each day). The task is to assemble a database and, as a basic option, an interface in php that connects to the database, output information from the columns to the calendar by the id of each line. Will such a large number of columns slow down the database?
Alternatively, there is a proposal to put 2 every single day in a separate line, but there is a suspicion that this will greatly complicate the derivation of information, you will have to do some kind of crutches.
Please let me know which option is better in your opinion.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MaLuTkA_UA, 2020-01-26
@MaLuTkA_UA

Your idea is complete nonsense. The table should store information, not default values. Since you wrote, you will have 5 columns filled with unique data, I suspect id is among them (add if not) and all this is your main table. Everything else needs to be stored in another table that affects the main one by foreign key.
An example of the names of the columns of the second table:
- id from the main table
- date of entry
- entry
There will be no problems with this system, since you can easily get any required information with one request

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question