代码改变世界

MongoDB性能突然降低

2022-12-14 19:50 by abce, 182 阅读, 0 推荐, 收藏, 编辑
摘要:MongoDB运行的好好的,突然性能下降。产生的原因可能有很多种,比如:长时间运行的查询、创建索引、写竞争等。 1.MongoDB的慢查询有一些工具可以用来识别慢查询:(1).mongodb日志 egrep "[0-9]{3,}ms" mongod.log | awk '{ print $NF, $ 阅读全文

查看sqlserver备份历史

2022-12-14 08:44 by abce, 103 阅读, 0 推荐, 收藏, 编辑
摘要:SELECT T1.name ,T3_full.full_backup_start_date ,T3_full.full_backup_finish_date ,T3_full.full_Duration ,t3_full.full_backup_size ,t3_full.full_physica 阅读全文

gtid复制中跳过错误事务的另一种方法

2022-12-13 22:28 by abce, 163 阅读, 0 推荐, 收藏, 编辑
摘要:gtid复制中跳过错误事务的另一种方法 replica1 > select @@gtid_mode; + + | @@gtid_mode | + + | on | + + replica1 > stop slave; query ok, 0 rows affected (0.02 sec) repl 阅读全文

MongoDB的local数据库

2022-12-12 15:12 by abce, 461 阅读, 0 推荐, 收藏, 编辑
摘要:每个mongod实例都有自己的local数据库,用于存储复制过程中使用的数据和其他特定于实例的数据。local数据库对复制不可见:不复制local数据库中的集合。 local数据库中的集合: > use local switched to db local > show collections; o 阅读全文

Awesome Prometheus alerts

2022-12-05 16:13 by abce, 73 阅读, 0 推荐, 收藏, 编辑
摘要:Awesome Prometheus alerts | Collection of alerting rules (grep.to) 阅读全文

SQL Commands

2022-12-01 11:05 by abce, 21 阅读, 0 推荐, 收藏, 编辑
摘要:SQL Commands DDL(Data Definition Language) create drop alter tgruncate rename DML(Data Manipulation Language) insert update delete call Call a PL/SQL 阅读全文

MySQL ERROR 1227 (42000)错误处理

2022-11-30 18:35 by abce, 7040 阅读, 0 推荐, 收藏, 编辑
摘要:在还原数据库的时候,遇到以下报错: ERROR 1227 (42000) at line 18: Access denied; you need (at least one of) the SUPER, SYSTEM_VARIABLES_ADMIN or SESSION_VARIABLES_ADMI 阅读全文

MySQL双重密码是如何工作的

2022-11-28 17:23 by abce, 63 阅读, 0 推荐, 收藏, 编辑
摘要:假设先创建了一个用户: MySQL> create user abce@'%' identified by 'abce'; Query OK, 0 rows affected (0.01 sec) MySQL> grant all on abce.* to abce@'%'; Query OK, 0 阅读全文

mysql使用sys和performance_schema查看慢查询

2022-11-23 14:07 by abce, 154 阅读, 0 推荐, 收藏, 编辑
摘要:select schema_name, format_pico_time(total_latency) total_latency, exec_count, format_pico_time(total_latency/exec_count) latency_per_call, query_samp 阅读全文

sqlserver查看每个活跃会话使用了多少TempDB

2022-11-18 16:08 by abce, 66 阅读, 0 推荐, 收藏, 编辑
摘要:;WITH task_space_usage AS ( -- SUM alloc/delloc pages SELECT session_id, request_id, SUM(internal_objects_alloc_page_count) AS alloc_pages, SUM(intern 阅读全文
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 118 下一页