摘要: 1.对查询进行优化,要尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。 2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如: 最好不要给数据库留NULL,尽可能的使用 NOT NULL填充数据库. 备注 阅读全文
posted @ 2017-07-20 10:50 MalcolmFeng 阅读(220) 评论(0) 推荐(0) 编辑
摘要: varchar(n) 长度为 n 个字节的可变长度且非 Unicode 的字符数据。n 必须是一个介于 1 和 8,000 之间的数值。存储大小为输入数据的字节的实际长度,而不是 n 个字节。nvarchar(n)包含 n 个字符的可变长度 Unicode 字符数据。n 的值必须介于 1 与 4,0 阅读全文
posted @ 2017-07-20 10:32 MalcolmFeng 阅读(373) 评论(0) 推荐(1) 编辑
摘要: //: Playground - noun: a place where people can play import UIKit var str = "Hello, playground" //-------------------- 类和属性 -------------------- class Role{ //成员属性 var id = "" v... 阅读全文
posted @ 2017-06-15 17:12 MalcolmFeng 阅读(189) 评论(0) 推荐(0) 编辑
摘要: //: Playground - noun: a place where people can play import UIKit //---------------------- Hello world ---------------------- var str = "Hello, playground" print("Hello world and " + str) print("... 阅读全文
posted @ 2017-06-14 15:48 MalcolmFeng 阅读(225) 评论(0) 推荐(0) 编辑
摘要: MNIST机器学习的原理: 通过一次次的 输入某张图片的像素值(用784维向量表示)以及这张图片对应的数字(用10维向量表示比如数字1用[0,1,0,0,0,0,0,0,0,0]表示),来优化10*784个W和10个b参数(通过交叉熵评估建立的模型)。 阅读全文
posted @ 2017-06-07 16:19 MalcolmFeng 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 一、术语和概念的对比 primary key Specify any unique column or column combination as primary key. primary key In MongoDB, the primary key is automatically set to 阅读全文
posted @ 2017-06-03 15:46 MalcolmFeng 阅读(1848) 评论(0) 推荐(0) 编辑
摘要: 数据如下: 一、shell操作delete语句 二、python操作delete语句 三、java操作delete语句 阅读全文
posted @ 2017-06-01 15:51 MalcolmFeng 阅读(3144) 评论(1) 推荐(0) 编辑
摘要: 数据如下: 一、shell执行update语句 二、python操作update语句 三、Java操纵update语句 阅读全文
posted @ 2017-06-01 15:38 MalcolmFeng 阅读(836) 评论(0) 推荐(0) 编辑
摘要: 一、shell执行mongodb查询(简单json数据结构) 二、python执行mongodb查询(简单json数据结构) 三、java执行mongodb查询(简单json数据结构) 四、嵌套json数据格式的查询: 1.shell方式: 如果数据格式如下: 2.python方式: 如果数据格式如 阅读全文
posted @ 2017-05-31 15:49 MalcolmFeng 阅读(5690) 评论(0) 推荐(0) 编辑
摘要: 一、shell操作mongodb 1.新增一条数据 : db.collection.insertOne(‘json对象’) eg: 2.新增多条数据 : db.collection.insertMany(‘json数组’) eg: 3.新增一条或多条数据: db.collection.insert( 阅读全文
posted @ 2017-05-31 12:54 MalcolmFeng 阅读(11086) 评论(0) 推荐(0) 编辑