RICHIE


  • 首页

  • 归档

  • 分类

  • 标签

MySQL大数据量分页性能优化

发表于 2018-03-27 | 分类于 笔记

1.直接用limit start, count分页语句, 也是我程序中用的方法:

1
select * from product limit start, count

当起始页较小时,查询没有性能问题,我们分别看下从10, 100, 1000, 10000开始分页的执行时间(每页取20条), 如下:

1
2
3
4
select * from product limit 10, 20   0.016秒
select * from product limit 100, 20   0.016秒
select * from product limit 1000, 20   0.047秒
select * from product limit 10000, 20   0.094秒

阅读全文 »

iOS 相机(摄像头)获取到的图片自动旋转90度解决办法

发表于 2018-03-27 | 分类于 笔记

用相机拍摄出来的照片含有EXIF信息,UIImage的imageOrientation属性指的就是EXIF中的orientation信息。

如果我们忽略orientation信息,而直接对照片进行像素处理或者drawInRect等操作,得到的结果是翻转或者旋转90之后的样子。这是因为我们执行像素处理或者drawInRect等操作之后,imageOrientaion信息被删除了,imageOrientaion被重设为0,造成照片内容和imageOrientaion不匹配。

所以,在对照片进行处理之前,先将照片旋转到正确的方向,并且返回的imageOrientaion为0。

阅读全文 »

centOS7 安装nginx php mysql

发表于 2018-03-21 | 分类于 笔记

nginx安装

本文是介绍使用源码编译安装,包括具体的编译参数信息。

正式开始前,编译环境gcc g++ 开发库之类的需要提前装好。

安装make:

1
yum -y install gcc automake autoconf libtool make

安装g++:

1
yum install gcc gcc-c++

阅读全文 »
123
Richie Zhang

Richie Zhang

23 日志
2 分类
5 标签
E-Mail
© 2018 — 2019 Richie Zhang