摘要: 使用动态管理视图sys.dm_exec_query_stats:这个视图提供了有关过去执行的查询的信息,包括查询文本、执行次数、平均执行时间等。可以按照执行时间、CPU时间、逻辑读取等指标进行排序和过滤。 SELECT creation_time, last_execution_time, tota 阅读全文
posted @ 2024-04-27 13:11 KeepChasing 阅读(197) 评论(0) 推荐(0) 编辑
摘要: notion-enhancer 使用体验: 文章标题过多会卡死 下载: https://www.chajianxw.com/product-tool/42822.html 阅读全文
posted @ 2024-04-20 16:36 KeepChasing 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 大概率是杀毒软件问题,我的问题是有360杀毒导致的 网上的方案有如下,也都进行了尝试: 重启Visual Studio 以管理员身份运行Visual Studio 清理解决方案 删除bin目录下的所有文件 均无效,无奈之下继续寻找解决方案,发现用Process Monitor来监控到底是谁在搞鬼。 阅读全文
posted @ 2024-03-06 11:49 KeepChasing 阅读(49) 评论(0) 推荐(0) 编辑
摘要: STUFF() 在 SQL Server 中,stuff() 函数用于从源字符串中删除给定长度的字符序列,并从指定的起始索引插入给定的字符序列。 STUFF (source_string, start, length, change_string) source_string:字符数据 start 阅读全文
posted @ 2023-01-29 11:39 KeepChasing 阅读(61) 评论(0) 推荐(0) 编辑
摘要: 语法 ‹窗口函数› over (partition by ‹用于分组的列名› order by ‹用于排序的列名›) ‹窗口函数›的位置,可以放以下两种函数: 专用窗口函数,比如rank, dense_rank, row_number等 聚合函数,如sum. avg, count, max, min 阅读全文
posted @ 2023-01-19 09:45 KeepChasing 阅读(63) 评论(0) 推荐(0) 编辑
摘要: 举例 表数据 | RowID | TotalAmount | | | | | 1 | NULL | | 2 | 100.00 | 建表语句 CREATE TABLE [Amount]( [RowID] [bigint] IDENTITY(1,1) NOT NULL, [TotalAmount] [d 阅读全文
posted @ 2023-01-13 16:31 KeepChasing 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 递归查询示例 Common Table Expressions(CTE) 注意事项 在递归公用表表达式的递归部分不允许使用外部联接。 表数据 | RowID | ID | Name | PID | | | | | | | 1 | 10001 | 总经理室 | NULL | | 2 | 10002 | 阅读全文
posted @ 2023-01-12 16:03 KeepChasing 阅读(234) 评论(0) 推荐(0) 编辑
摘要: 结构 DECLARE Emp_Cursor CURSOR FOR SELECT EmpID, EmpName FROM Employee OPEN Emp_Cursor FETCH NEXT FROM Emp_Cursor WHILE @@FETCH_STATUS = 0 BEGIN --DO SO 阅读全文
posted @ 2022-12-06 10:40 KeepChasing 阅读(101) 评论(0) 推荐(0) 编辑
摘要: SqlServer2012增加的新分页方式 OFFSET/FETCH NEXT 语法 OFFSET=偏移,跳过 rows FETCH = 取 rows only 示例 越过 1 万条,取 50 条 SELECT * from User ORDER BY UserID OFFSET 100000 RO 阅读全文
posted @ 2022-12-06 10:24 KeepChasing 阅读(267) 评论(0) 推荐(0) 编辑
摘要: row_number()over() 表数据 | rowID | order_id | dish_id | quantity | price | | | | | | | | 1 | O001 | D001 | 1 | 20.00 | | 2 | O001 | D002 | 1 | 5.00 | | 阅读全文
posted @ 2022-11-18 11:05 KeepChasing 阅读(39) 评论(0) 推荐(0) 编辑