关于一些人的选择 datetime timestamp int(10) bigint(13) 还有人选择用char来存储时间 - -# 时间区间的差别 datetime ? ? ? ? ? ?时间区间(0000年到9999年) timestamp ? ? ? ? ?时间区间(1970到2038-...
分类:
其他好文 时间:
2015-09-26 14:46:03
阅读次数:
134
1、创建表结构:CREATE TABLE `common_area` ( `id` bigint(20) unsigned NOT NULL COMMENT '主键ID', `name` varchar(100) DEFAULT NULL COMMENT '省市区名称', `pid` bigint(...
分类:
其他好文 时间:
2015-09-18 11:58:53
阅读次数:
7213
查询数据库中所有表的大小,哪些表的数据量较大create table #t(name varchar(255), rows bigint, reserved varchar(20), data varchar(20), index_size varchar(20), unused varchar(2...
分类:
数据库 时间:
2015-09-17 17:37:39
阅读次数:
147
ALTER table t_shift_use modify phone BIGINT(20)http://blog.csdn.net/hupanfeng/article/details/21454847http://www.360doc.com/content/14/0823/22/1902029...
分类:
其他好文 时间:
2015-09-16 00:50:53
阅读次数:
152
常见的一个场景是Hive里面一个带分区的表,原来是int类型的字段,后来发现数据超过了int的最大值,要改成bigint。或者是bigint要改string或decimal。无论如何,对于带分区的表,要改列类型,有一个坑:如果使用alter table t change column oldcol ...
分类:
其他好文 时间:
2015-09-09 19:31:37
阅读次数:
378
数据库 C#程序 int int32 text string bigint int64 binary System.Byte[] bit Boolean char string datetime System.DateTime decimal System.Decimal float System.Double image System.Byte[] money System.D...
分类:
数据库 时间:
2015-09-08 18:40:12
阅读次数:
177
先来一段json_decode官方说明mixedjson_decode(string$json[,bool$assoc= false[,int$depth= 512[,int$options= 0]]] )由于在处理订单中需要使用到比较大的整形,而第三方回传的json中,订单大小超过了本机可处理的最...
分类:
Web程序 时间:
2015-09-07 12:32:59
阅读次数:
242
话说工欲善其事,必先利其器。今天就简单介绍下EXPLAIN。内容导航idselect_typetabletypepossible_keyskeykey_lenrefrowsExtra环境准备MySQL版本:创建测试表CREATE TABLE people( id bigint auto_inc...
分类:
数据库 时间:
2015-09-07 00:36:11
阅读次数:
312
ash 索引结构的特殊性,其检索效率非常高,索引的检索可以一次定位,不像B-Tree 索引需要从根节点到枝节点,最后才能访问到页节点这样多次的IO访问,所以 Hash 索引的查询效率要远高于 B-Tree 索引。 可 能很多人又有疑问了,既然 Hash 索引的效率要比 B-Tree 高很多,为什么大...
分类:
数据库 时间:
2015-09-06 12:51:35
阅读次数:
198
整数类型: tinyint、smallint、mediumint、int、bigint分别使用8、16、24、32、64位存储空间,在保证储值范围够用的情况下,选择最小的数据类型实数类型(包含小数部分时): decimal字符串类型: varchar类型 存储可变长字符串 char 存储固定...
分类:
数据库 时间:
2015-08-21 23:06:28
阅读次数:
256