摘要:
今天看了篇帖子,被几个地方转载,但是性能不太好,因为不能评论,所以把优化思路写在这里。1.确定需求: 根据部门来分组,显示各员工在部门里按薪水排名名次.2.来创建实例数据:drop table if exists heyf_t10;create table heyf_t10 (empid int ,deptid int ,salary decimal(10,2) );insert into heyf_t10 values(1,10,5500.00),(2,10,4500.00),(3,20,1900.00),(4,20,4800.00),(5,40,6500.00),(6,40,14500.0 阅读全文
摘要:
在这里看到了一个帖子http://www.iteye.com/topic/1122917,很简单,凑下热闹,因为Oracle,SQLServer的子查询和Join算法的选择很多,但是MySQL方面就没有那么多的选择了,所以很多子查询的性能都很差,这里分析几个帖子里MySQL的答案。需求:使用SQL语句查出哪些人即会玩basketball又会玩badminton,找出这样的name-hobby组合create table test (NAME varchar(20) not null, HOBBY varchar(20) not null);insert into test values( 阅读全文
摘要:
都是基本命令,做完后清晰了很多概念,下载前往 https://github.com/Gazler/githug通关纪念xuexiaodong79 at Air in ~/git_hug on master$ githug ********************************************************************************* Githug *********************************************************************************Congratulations, yo 阅读全文
摘要:
迁移项目必然要遇到旧的库在新的环境下水土不服的情况,首先遇到的难题是ASIHttpRequest。Stackoverflow上找到了一个答案,如下:It's very easy to use asi-http-request in an ARC environment without changing anything, simply follow these steps:Simply create a static library target.Add asi-http-request files as required to the library targetConfigure 阅读全文
摘要:
重启MySQL时遇到下边错误InnoDB: Error: data file /usr/local/mysql/data/ibdata1 is of a different sizeInnoDB: 1152 pages (rounded down to MB)InnoDB: than specified in the .cnf file 1216 pages!找到原因是因为给mysql添加数据文件没有正确配置引起,查看一下当前数据文件的大小l# ll -h /usr/local/mysql/data/-rw-rw---- 1 mysql mysql 18M Mar 5 03:01 ibdata 阅读全文
摘要:
几个月前就开始关注视觉中国从MySQL转换到MongoDB的文章,随后看了两遍QConBeijing2011的这个PPT,很过瘾,全是干货,记录一下视觉中国的MongoDB应用实践(QConBeijing2011) View more presentations from Night Sailer 阅读全文