当前位置:网站首页>Query on the performance of multi table view in MySQL

Query on the performance of multi table view in MySQL

2022-06-23 07:45:00 CSDN Q & A

That's true , There is a project , The database uses mysql. Then there are many functions for users in the project , for instance , Users can create a lottery function , You can also create a scratch card function , wait , Each function uses a table in the database as a correspondence .
The question we are considering now is :
Now there are only two functions: lottery and scratch card , So when we want to check what functions a user has created , When was it created , We only need to query the user record table and lottery menu or the user record table and scratch card menu . But then we need to add functions, such as adding the turntable function , And more and more . There will probably be 50 More than one
What we need is to know what functions the user has created , When was this data created ( The time when the function was created is saved in the corresponding menu ). So I wondered if I could make a view , Put the creation time of the user record table and the corresponding menu into a view , In this way, you can directly modify the statement to make the view display the newly added functions . by the way , The view created is for query purposes only , Do not insert, update or delete data . But considering that so many tables are associated in the view , Is there a performance problem ?

原网站

版权声明
本文为[CSDN Q & A]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/174/202206161558577394.html