当前位置:网站首页>mysql中多表视图性能疑惑
mysql中多表视图性能疑惑
2022-06-23 07:01:00 【CSDN问答】
是这样的,有一个项目,数据库用的是mysql.然后项目中有很多个给用户的功能,比如说,用户可以创建一个抽奖功能,也可以创建一个刮刮卡功能,等等,每个功能在数据库中都使用一张表作为对应。
现在考虑到的问题是这样的:
现在只有抽奖和刮刮卡两个功能,所以当我们要在查某个用户创建了什么功能,创建时间是什么时候,我们只要对用户记录表和抽奖功能表或者用户记录表和刮刮卡功能表进行关联查询就可以了。但是之后还要再加功能比如加转盘功能之类,并且会越来越多。大概会有50多个吧
而我们要的就是想知道用户创建了什么功能,什么时候创建的这点数据而已(创建功能的时间保存在对应的功能表中)。所以我就想能不能弄成一个视图,把用户记录表和对应的功能表的时间创建放到一张视图里面去,这样以后就直接修改一下语句让视图显示新加进来的功能就可以了。对了,创建的视图只作查询用,不做插入和更新数据和删除数据。但是考虑到会关联那么多表在视图中,会不会有性能问题?
边栏推荐
- 基于51单片机的温度检测监测报警系统设计
- MySQL summary
- Eureka service registration and discovery
- Live broadcast review | how can the container transformation of traditional applications be fast and stable?
- 【PyQt5系列】修改计数器实现控制
- Akamai-1.75版本-_abck参数生成-js逆向分析
- Product axure9 (English version), prototype design background dynamic secondary menu display content
- 在kubernetes中部署kubersphere
- [pyqt5 series] modify the counter to realize control
- The original cloud landed in deep water, and the cloud product family of Boyun container released four values
猜你喜欢

20bn Jester complete dataset Download

MySQL (IV) - MySQL storage engine

在线JSON转CSharp(C#)Class工具

链游飞船开发 农民世界链游开发 土地链游开发

论文写作之WPS安装Mathtype插件编写数学公式

RFID data security experiment: C # visual realization of parity check, CRC redundancy check and Hamming code check

Eureka service registration and discovery

【云计算赛项】职业技能竞赛--容器开发部分例题Pig快速开发框架

Akamai-1.75版本-_abck参数生成-js逆向分析

一篇文章学会er图绘制
随机推荐
What is distributed?
U-Net: Convolutional Networks for Biomedical Image Segmentation
[interface automation] software testing the core skills of salary increase to increase salary by 200%
Focusing on the industry, enabling customers | release of solutions for the five industries of the cloud container cloud product family
异构交易场景交互流程及一致性保证
Mysql数据库的几个特点
Akamai-1.75版本-_abck参数生成-js逆向分析
【AI实战】xgb.XGBRegressor之多回归MultiOutputRegressor调参1
传智教育 | 项目发布前如何打tag标签及标签命名规范
微信多人聊天及轮盘小游戏(websocket实现)
20bn Jester complete dataset Download
Console Application
three. Solution to stripe shadow and grid shadow in JS
Ldconfig command
Live broadcast review | how can the container transformation of traditional applications be fast and stable?
‘latin-1‘ codec can‘t encode characters in position 103-115: Body (‘一串中文‘) is not valid Latin-1
Product axure9 (English version), prototype design background dynamic secondary menu display content
Basic experiment of data statistics and analysis - basic grammar and operation
SimpleDateFormat 线程安全问题
User mode and kernel mode