Hello colleagues =). Here I read articles about sql requests from experts (about two years ago), but I randomly saw no docking with the article. This concerns query optimization.
The use of "*" in the request is not recommended, which reduces the performance of the request by the server.
made a request:
SELECT * FROM user ... // Выполняется около 0,004 секунд( Проверял тест 10 раз) SELECT `x`, `x1`, `x2`, `xn` FROM user // Выполняется 0,0065 ( В среднем). Примерно полей 14.
And a little question yet. I have one user table. This table is used on several sites that are located on the same server. Each site has its own data which is stored in the user table. But only 30% of the data that is stored in the user table coincide with all projects. And the remaining 70% of each project. The essence of the question: is it worth it to split the user table, as the main + special for each project using LEFT JOIN when querying. Comment on how it will be better in the form of performance?