(一)统计信息分类 Oracle的统计信息可以分为如下6类: 统计信息分类 作用 表的统计信息 包含记录数、表块的数量、平均行长度等 索引的统计信息 包含索引的高度、叶子块的数量、聚簇因子等 列的统计信息 包含列的distinct值、列的null值的数量、列的最小值、列的最大值以及直方图等 系统统计 ...
分类:
数据库 时间:
2020-05-30 19:53:33
阅读次数:
65
count distinct vs. count group by 很多情景下,尤其对于文本类型的字段,直接使用count distinct的查询效率是非常低的,而先做group by更count往往能提升查询效率。但实验表明,对于不同的字段,count distinct与count group b ...
分类:
数据库 时间:
2020-05-30 10:30:21
阅读次数:
102
mysql -u root -p//之后输入自己的root密码 show databases; 显示数据库 create database name; 创建数据库 use databasename; 选择数据库 drop database name 直接删除数据库,不提醒 show tables; ...
分类:
系统相关 时间:
2020-05-29 09:32:38
阅读次数:
80
1、单字段去重 select distinct aly_layer from t_aly_il_result 2、多字段去重 select distinct aly_layer,CREATE_TIME from t_aly_il_result 3、对去重字段进行统计 select count(dis ...
分类:
其他好文 时间:
2020-05-28 13:37:47
阅读次数:
64
主要是对SELECT子查询进行嵌套使用 对于某些问题不容易解决, 可以考虑使用子查询 -- Find products that are more -- expensive than Lettuce (id = 3) USE sql_store; SELECT * FROM products WHE ...
分类:
其他好文 时间:
2020-05-28 01:09:45
阅读次数:
98
and,or,in,distinct,like,@,is null,is not null,where,GROUP BY,聚合函数MAX,MIN,AVG ...
分类:
数据库 时间:
2020-05-23 09:40:55
阅读次数:
63
链接:https://leetcode-cn.com/problems/longest-continuous-increasing-subsequence/ 代码: class Solution { public: int findLengthOfLCIS(vector<int>& nums) { ...
分类:
其他好文 时间:
2020-05-23 00:13:44
阅读次数:
45
题目链接: http://codeforces.com/contest/1343/problem/CC. Alternating Subsequencetime limit per test1 secondmemory limit per test256 megabytesinputstandard ...
分类:
其他好文 时间:
2020-05-21 22:28:44
阅读次数:
79
和谐数组是指一个数组里元素的最大值和最小值之间的差别正好是1。 现在,给定一个整数数组,你需要在所有可能的子序列中找到最长的和谐子序列的长度。 来源:力扣(LeetCode) class Solution { public: int findLHS(vector<int>& nums) { unor ...
分类:
其他好文 时间:
2020-05-18 23:01:29
阅读次数:
74
题目 Given a sequence of K integers { N?1?? , N?2?? , ..., N?K?? }. A continuous subsequence is defined to be { Ni?? , N?i+1?? , ..., N?j?? } where 1≤i≤ ...
分类:
其他好文 时间:
2020-05-18 22:37:14
阅读次数:
57