sql查询语句优化 1、对查询进行优化,应尽量避免全表扫描 a、 where 及 order by 涉及的列上建立索引 b、 尽量避免在 where 子句中对字段进行 null 值判断,可以将null值设置默认值0等,如:将select id from t where num is null变为se ...
分类:
数据库 时间:
2020-07-16 12:10:58
阅读次数:
81
1.先在mysql数据库添加数据 DROP TABLE IF EXISTS `dept`;CREATE TABLE `dept` ( `id` int(11) NOT NULL, `pid` int(11) DEFAULT NULL, `name` varchar(255) CHARACTER SE ...
分类:
数据库 时间:
2020-07-16 11:48:49
阅读次数:
129
private static class ParameterizedTypeTest<T extends Number> { private List<T> list = null; public static void main(String[] args) throws NoSuchFieldE ...
分类:
其他好文 时间:
2020-07-16 11:48:00
阅读次数:
52
场景:投票点赞 在更新总条数字段时 EF先读取model 再进行更新的情景 容易出现并发问题 可参考文档: https://docs.microsoft.com/zh-cn/ef/ef6/saving/concurrency?redirectedfrom=MSDNhttps://www.cnblog ...
分类:
其他好文 时间:
2020-07-16 10:16:39
阅读次数:
103
exec sp_addlinkedserver '--别名(自定义)--', ' ', 'SQLOLEDB ', '服务器ip' --连接 exec sp_addlinkedsrvlogin '--别名--', 'false ',null, '--用户名--', '--密码--' --登录 别名:自 ...
分类:
数据库 时间:
2020-07-16 10:10:19
阅读次数:
81
这道题目我之前做过就不多解释了:https://www.cnblogs.com/cstdio1/p/13072712.html /** * Definition for singly-linked list. * public class ListNode { * int val; * ListNo ...
分类:
其他好文 时间:
2020-07-16 00:10:32
阅读次数:
52
数据类型判断 数据类型有 number string boolean null undefined function object 这些,那如何去判断数据对应的是哪种类型呢 typeof可以判断对应数据类型 写法: typeof data 或者 typeof(data) , 一般习惯写后面这种 返回 ...
分类:
编程语言 时间:
2020-07-15 23:25:22
阅读次数:
72
上一篇安装了 xxl-job的服务端, https://www.cnblogs.com/a393060727/p/13306981.html 接下来是客户端安装。 还是照着官网来。 在我们下载的git代码中,有个xxl-job-executor-samples子工程, 这个子工程就是当前支持的各种语 ...
分类:
编程语言 时间:
2020-07-15 23:15:28
阅读次数:
74
【题目】 给定一棵二叉树的其中一个节点,请找出中序遍历序列的下一个节点。 注意: 如果给定的节点是中序遍历序列的最后一个,则返回空节点; 二叉树一定不为空,且给定的节点一定不是空节点; 样例 假定二叉树是:[2, 1, 3, null, null, null, null], 给出的是值等于2的节点。 ...
分类:
其他好文 时间:
2020-07-15 22:53:47
阅读次数:
59
public boolean isBalanced(TreeNode root) { if (root == null) { return true; } int diff = getDepth(root.left) - getDepth(root.right); diff = diff > 0 ? ...
分类:
其他好文 时间:
2020-07-15 22:51:05
阅读次数:
53