今天,公司项目某个模块的导出报如下错误: HTTP Status 500 – Internal Server Error Type Exception Report Message Handler dispatch failed; nested exception is java.lang.OutOfMemoryError: GC overhead limit exceeded Description The server encountered an unexpected condition
今天优化数据库的慢查询,有一条Sql让我百思不得其jie,就是他了. SELECT * FROM test WHERE user_id=1; 用explain 去分析一下 索引都有了,为什么还要扫描全表呢?类似的情况,有在哪闪现过,就去查看表结构,原来user_id这个字段是字符类型,做个记录,以免日后再犯傻. 以下是用不到索引的几种情况 表字段用的字符串类型,查询的也应该是字符类型 LIKE 查询 对字段进行NULL判断 使用OR关键字查询,使用UNION代替OR
个人平时记录的,有点乱 1.修改时间字段,如果时间字段的类型是date或者是datetime类型的 update 表名 set 时间字段 = DATE_FORMAT(NOW(),'%Y-%m-%d %H:%i:%s') where id = 110 2.查询时间格式为date或者datetime类型的数据,用时间做条件的 select * from 表名 where date_format(时间字段,'%Y-%m-%d') = '2016-12-10' 3.替换某个字段中的指定字符或数据 upd
一.BLOB字段 BLOB是指二进制大对象也就是英文Binary Large Object的所写,而CLOB是指大字符对象也就是英文Character Large Object的所写.其中BLOB是用来存储大量二进制数据的:CLOB用来存储大量文本数据.BLOB通常用来保存图片.文件等二进制类型的数据. 二.使用mybatis操作blob 1.表结构如下: create table BLOB_FIELD ( ID BYTE) not null, TAB_NAME BYTE) not null,
HIVE Map Join is nothing but the extended version of Hash Join of SQL Server - just extending Hash Join into Distributed System. SMB(Sort Merge Bucket) Join is also similar to the SQL Server Merge Join mechnism - just extending it into Distributed S
mysql语句中把string类型字段转datetime类型 在mysql里面利用str_to_date()把字符串转换为日期 此处以表h_hotelcontext的Start_time和End_time字段为例,查询当前 时间在此范围之内的数据. www.2cto.com select * from h_hotelcontext where now() between STR_TO_DATE (Start_time,'%Y-%m-%d %H:%i:%s') and STR_T
map 是键-值对的集合.map 类型通常可理解为关联数组(associative array): 可使用键作为下标来获取一个值,正如内置数组类型一样.而关联的本质在于元素的值与某个特定的键相关联,而并非通过元素在数组中的位置来获取. [1. map 对象的定义] 要使用 map 对象,则必须包含 map 头文件.在定义 map 对象时,必须分别指明键和值的类型: // count number of times each word occurs in the input map<string,