当前位置:网站首页>On the role of database tables
On the role of database tables
2022-06-30 03:00:00 【CSDN Q & A】
The previous project encountered a slow sql The problem of , It is caused by a large amount of data postgres, In addition to the index, a sub table is added trigger
The general function is to insert into the parent table maintable According to the field of the inserted record (date) Insert sub tables separately subtable_date in
In this way, the sub table is queried subtable_date
But sub tables don't really exist , In addition, even if the sub table is queried, it will still be queried in the target , This is followed by date What is the difference between conditional queries
What's the point of doing this , Will the performance be improved
Take the answer :
You have inserted data into it , I also said that the sub table does not really exist ?
Create a separate table like this , The meaning is that if there are certain scenarios, only the data in the sub table is required , For example, front-end search condition range control , Then it must be faster to check this sub table than the parent table .
in addition , You didn't give the complete structure of the child table and the parent table , Inquire about sql No , The implementation plan is not posted , I didn't explain the complete logic of the trigger , Nor did it make clear all the scenarios related to these two tables , Therefore, it is not possible to make a comprehensive evaluation of this practice for the time being .
边栏推荐
- How do I enable assembly binding logging- How can I enable Assembly binding logging?
- C console format code
- Raii memory management
- 【直播笔记0629】 并发编程二:锁
- 华为面试题: 分糖果
- 正则全匹配:密码由8位以上数字,大小写字母,特殊字符组成
- Unity timeline data binding
- Xunwei NXP itop-imx6 development platform
- C # basic learning (XIII) | breakpoint debugging
- shell统计某个字符串最后一次出现的位置之前的所有字符串
猜你喜欢

DC/DC变换器轻载时三种工作模式的原理及优缺点

重磅来袭--UE5的开源数字孪生解决方案

CMake教程系列-02-使用cmake代碼生成二進制

LeetCode 3. 无重复字符的最长子串

Unity3d ugui force refresh of layout components

Distributed file storage system fastdfs hands on how to do it

Software testing skills, JMeter stress testing tutorial, transaction controller of logic controller (25)

How to use vant to realize data paging and drop-down loading

自定义MVC的使用

并发请求下如何防重复提交
随机推荐
Mysql表数据比较大情况下怎么修改添加字段
JMeter obtains cookies across thread groups or JMeter thread groups share cookies
RAII内存管理
MySQL extracts strings from table fields
High paid programmers & interview questions series 63: talk about the differences between sleep (), yield (), join (), and wait ()
How to switch ipykernel to a different CONDA virtual environment in jupyterlab?
Cmake tutorial series-01-minimum configuration example
Heavy attack -- ue5's open source digital twin solution
Raki's notes on reading paper: neighborhood matching network for entity alignment
Linear algebra Chapter 3 summary of vector and vector space knowledge points (Jeff's self perception)
[live broadcast notes 0629] Concurrent Programming II: lock
New edition of diazotization process in 2022 and analysis of diazotization process
mysqldump原理
身份证号的严谨判断精确到队后一位
Raki's notes on reading paper: named entity recognition as dependency parsing
Shell counts all strings before the last occurrence of a string
自定义JvxeTable的按钮及备注下$set的用法
Cmake tutorial series-03-dependency management
O & M (20) make and start USB flash disk and install win10
并发请求下如何防重复提交