当前位置:网站首页>mysql中多表视图性能疑惑
mysql中多表视图性能疑惑
2022-06-23 07:01:00 【CSDN问答】
是这样的,有一个项目,数据库用的是mysql.然后项目中有很多个给用户的功能,比如说,用户可以创建一个抽奖功能,也可以创建一个刮刮卡功能,等等,每个功能在数据库中都使用一张表作为对应。
现在考虑到的问题是这样的:
现在只有抽奖和刮刮卡两个功能,所以当我们要在查某个用户创建了什么功能,创建时间是什么时候,我们只要对用户记录表和抽奖功能表或者用户记录表和刮刮卡功能表进行关联查询就可以了。但是之后还要再加功能比如加转盘功能之类,并且会越来越多。大概会有50多个吧
而我们要的就是想知道用户创建了什么功能,什么时候创建的这点数据而已(创建功能的时间保存在对应的功能表中)。所以我就想能不能弄成一个视图,把用户记录表和对应的功能表的时间创建放到一张视图里面去,这样以后就直接修改一下语句让视图显示新加进来的功能就可以了。对了,创建的视图只作查询用,不做插入和更新数据和删除数据。但是考虑到会关联那么多表在视图中,会不会有性能问题?
边栏推荐
- JS to determine the added and decreased elements of two arrays
- [AI practice] xgb Xgbregression multioutputregressor parameter 2 (GPU training model)
- 如何优雅的快速下载谷歌云盘的大文件 (二)
- 《一周的朋友》
- Cirium has gradually become the standard for airlines' carbon dioxide emission reporting
- Live broadcast review | how can the container transformation of traditional applications be fast and stable?
- Design of temperature detection and alarm system based on 51 single chip microcomputer
- Spock约束-调用频率/目标/方法参数
- 微信多人聊天及轮盘小游戏(websocket实现)
- Arthas thread command locates thread deadlock
猜你喜欢

Principle of skip table

Live broadcast review | how can the container transformation of traditional applications be fast and stable?

Make a record of glib2.14 upgrading glib2.18 and the principle of the steps

EXCEL VBA 入门与实用例子
![[Planet selection] how to efficiently build fine-grained two-way links between roam and thebrain?](/img/ee/ce9f55694b28c391eb07cb11298caf.jpg)
[Planet selection] how to efficiently build fine-grained two-way links between roam and thebrain?

SimpleDateFormat 线程安全问题

Detailed explanation of redis persistence, master-slave and sentry architecture

Yolov5 detecting small targets (with source code)

Online JSON to CSharp (c) class tool

RFID data security experiment: C # visual realization of parity check, CRC redundancy check and Hamming code check
随机推荐
《一周的朋友》
Here comes the dry goods | PAAS collection to see first ~
20bn Jester complete dataset Download
Pagoda forgot password
Unity picture loading and saving
MySQL (IV) - MySQL storage engine
3dmax插件开发环境配置及FileExport和Utilities模板测试
Mysql数据库的几个特点
Heterogeneous transaction scenario interaction process and consistency assurance
G++ compilation command use
[AI practice] data normalization and standardization of machine learning data processing
codeforce 158B Taxi
Ntu-rgbd data set download and data format analysis
[deep learning] [original] how to detect targets and draw map and other parameter maps without yolov5 weights or models
Sstable details
Judge black production based on CDN and client slow log characteristics
Hcip Road
【AI实战】机器学习数据处理之数据归一化、标准化
HCIP之路第八次实验
干货来了|《PaaS》合辑抢先看~