当前位置:网站首页>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
}
边栏推荐
- 微信小程序封装wx.request
- Leetcode skimming -- bit by bit record 022
- Toco generates tflite model
- PXE远程安装和Kickstart无人值守安装 技术文档
- Summary of topics related to strings
- After 100 billion of revenue, Alibaba cloud ecosystem has a new way to play
- selenium JD爬虫
- Idea integrated sonar complete process
- ROS2的topic pub 指令出现:Failed to populate field: ‘Vector3‘ object has no attribute ‘x:1‘错误
- mysql log理解
猜你喜欢

After 100 billion of revenue, Alibaba cloud ecosystem has a new way to play

When flutter runs flutter pub get, it reports an error: "the client does not have the required privileges“

Network data leakage events occur frequently, how to protect personal privacy information?

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

12 个适合做外包项目的开源后台管理系统

Question 300 Leçon 6 type quadratique

CLion + MinGW64配置C语言开发环境 Visual Studio安装

mysql log理解

第12届 蓝桥杯 嵌入式设计与开发项目

SQLZOO——SELECT Quiz
随机推荐
李宏毅机器学习2022-HW1
C# 客户端程序调用外部程序的3种实现方法
Question 300 Leçon 6 type quadratique
中国经济网:“元宇宙”炙手可热
Redis pseudo cluster one click deployment script - pro test available
Meituan's 8-year experience on how to improve test engineers (automation, performance, test development)
分期付款中的利率问题
牛客刷题篇——剑指offer (第二期)
Chapter 4 Executing Commands
C# EventHandler观察者模式
2022/7/21
C語言基礎知識梳理(一)
When flutter runs flutter pub get, it reports an error: "the client does not have the required privileges“
Sequence model (III) - sequence model and attention mechanism
Chapter2 Standard Output
HBV parameter extraction and fitting [draft]
C# IValueConverter接口用法举例
MapReduce advanced
ANTLR4 入门学习(一):下载和测试
Interpretation of ultra fast deep lane detection with hybrid anchor driven ordinal classification