当前位置:网站首页>Script of Nacos current limiting query
Script of Nacos current limiting query
2022-07-23 10:46:00 【Why worry about a dream with a Golden hoop】
9、 Current limiting sql
select date_sub(now(), interval 3 hour); -- Back forward 3 Hours
-- Records longer than the specified time
select * from log l where l.log_method='redisIncr' and DATE_FORMAT(l.log_time, "%Y-%m-%d")>='2021-12-30' limit 1;
-- Query the current limit record of the specified day
select * from log l where l.log_method='redisIncr' and DATE_FORMAT(l.log_time, "%Y-%m-%d")='2021-12-30' limit 1;
-- Query records older than the specified time
select * from log l where l.log_method='redisIncr' and l.log_time > date_sub(now(), interval 80 hour);
-- Sequence of current limiting times
select o.prt_no ' threshold ',
SUM(o.log_data) date_sum,
o.prt,
o.log_msg,
o.log_time
from (select distinct l.log_time,l.prt_no,l.log_data,l.prt,l.log_msg from log l where l.log_method='redisIncr' and log_time > date_sub(now(), interval 72 hour)) o
group by o.prt
order by date_sum desc;
-- Query the sorting of current limit times of a scene
select o.prt_no,
o.log_data ,
o.prt,
o.log_msg
from (select distinct l.log_time,l.prt_no,l.log_data,l.prt,l.log_msg from log l where l.log_method='redisIncr' and DATE_FORMAT(l.log_time, "%Y-%m-%d")>='2021-12-30') o
where o.prt='bind'
group by o.prt
order by o.log_data desc;
{
"2021-12-30 14:18:42":1,
"2021-12-30 14:18:18":1,
"2021-12-30 14:18:04":19,
"2021-12-30 14:18:28":1,
"2021-12-30 14:18:09":1,
"2021-12-30 14:18:35":1,
"2021-12-30 14:18:37":1,
"2021-12-30 14:18:38":1,
"2021-12-30 14:18:08":27,
"2021-12-30 14:18:00":2,
"2021-12-30 14:18:22":3,
"2021-12-30 14:18:43":1,
"2021-12-30 14:18:06":33,
"2021-12-30 14:18:45":1,
"2021-12-30 14:18:10":3,
"2021-12-30 14:18:52":1,
"2021-12-30 14:18:02":4,
"2021-12-30 14:18:24":1,
"2021-12-30 14:18:07":7,
"2021-12-30 14:18:25":1,
"2021-12-30 14:18:59":1,
"2021-12-30 14:18:01":4
}
边栏推荐
- What is instant messaging? Development of instant messaging
- China Economic Net: "Yuan universe" is hot
- 常见神经网络参数量与计算量
- 04_ UE4 advanced_ Introduction to physical collision and firing fireballs
- 第12届 蓝桥杯 嵌入式设计与开发项目
- SQLZOO——SELECT from WORLD Tutorial
- 300 题 第六讲 二次型
- PyQt5_ Pyqtgraph mouse draws line segments on the line graph
- Figure 8 sequence of crystal head connection of network cable
- Data warehouse: workflow design and Optimization Practice
猜你喜欢

Flutter 运行flutter pub get 报错“客户端没有所需特权“

Chapter 4: runtime data area - shared space

What is the core essence of smart parks?

300 questions, Lecture 6, quadratic form

ROS2的topic pub 指令出现:Failed to populate field: ‘Vector3‘ object has no attribute ‘x:1‘错误

SQLZOO——SELECT Quiz

Comprehensive experiment of realizing private network interworking under mGRE environment

牛客刷题篇——剑指offer (第二期)

LeetCode刷题--点滴记录023

第一章概述-------第一节--1.2互联网概述
随机推荐
Figure 8 sequence of crystal head connection of network cable
Data warehouse: workflow design and Optimization Practice
SQLZOO——SELECT Quiz
2022/7/22
Chapter 4: runtime data area - shared space
Kubernetes技术与架构(六)
mysql log理解
PyQt5_pyqtgraph鼠标在折线图上画线段
selenium JD爬虫
跳转语句与调试程序
美团8年经验之谈,测试工程师如何进阶(自动化、性能、测开)
openvino_ datawhale
第12届 蓝桥杯 嵌入式设计与开发项目
SPR:SUPERVISED PERSONALIZED RANKING BASED ON PRIOR KNOWLEDGE FOR RECOMMENDATION
What is the core essence of smart parks?
网络安全等级保护2.0标准解析
Chapter 4 Executing Commands
Warning lnk4210 reports an error when writing the driver
Exciting metauniverse! Wealth outlet of next generation Internet
C# 客户端程序调用外部程序的3种实现方法