数据库相关

mongoDB各种查询方式执行效率测试

最近正在使用mongoDB,使用官方的C#Drivers,对于不同的方式执行的效率(时间)不一样的。下面我们开始进入主题:启动本地mongoDB数据库>mongod-dbpathdata现在数据库有一个User表,大约有100万行数据。>db.myuser.count()>1000005其中,age字段已设置为索引>db.entities.ensureIndex({"age":1})我们一起来统计某些用户的最大年龄,符合条件的有21845条记录>db.en

系统 2019-08-12 01:55:28 2194

数据库相关

CI公用输入过滤处理函数

/***自动过滤变量,进行XSS,去空*支持:单个字符串,多维数组,数字*@paramtype$param='常规字符串'或array('字符串1','字符串2');*@returnstring|array*/finalprotectedfunctionhtml_trim($param=''){if(is_array($param)&&!empty($param)){returnhtml_escape($param);}if(is_string($para

系统 2019-08-12 01:55:25 2194

数据库相关

【DataBase Access】ODBC JDBC (Continued)

IhavefoundsthinterestingfromavideoofJavatechnique.TheoriginoftheODBC.HongLihasasupermarketnamedWal-Mart,LeiZhangalsohasasupermarketnamedRT-Mart.Lidoesn'thavehisownwarehouse,herentssomewarehousesnamedSQLwhichgateare2m*2m.Zhangdoesn

系统 2019-08-12 01:54:20 2194

数据库相关

正规表达