mysql
共 7 篇文章
转发MySQL 加锁处理分析
MySQL 加锁处理分析 http://hedengcheng.com/?p=771#_Toc374698306 发表于 2013 年 12 月 13 日 由 hedengcheng 1 背景 1 1.1 MVCC:Snapshot Read vs Current Read 2 1.2 Cluster Index:聚簇索引 3 1.3 2PL:Two-Phase Locking 3 1.4 Isolation Level 4 2 一条简单SQL的加锁实现分析 5 2.1 组合一:id主键+RC 6 2.2 组合二:id唯一索引+RC 6 2.3 组合三:id非唯一索引+RC 7 2.4 组合…
2014-04-15 11:25 · mysql
多线程测试对比infobright取数
#! /usr/bin/env python #coding=utf-8 import threading,sys import random import time from Queue import Queue import MySQLdb,time,datetime isFinish=False count_num_sql='''select count(1) t from fact_user_msg ''' #con_sql='''where ( d_o_lastordertime>='2012-06-19' and s_usr_level>60 and i_u_verified=1…
对比mysql一般引擎与infobright--2
切换到同一台物理机测试 1.物理机的情况: 内存:16g cpu:4核 cpu MHz : 800.000 2.建同样的库表 3.造数据5000w测试 ||sql||数量||mysql||infobright ||在服务器上全表count||5000w||25.08s||0.08s ||python执行:d_o_lastordertime>='2012-06-19' and s_usr_level>60 and i_u_verified=1 ||0||36s||<1s ||count:i_u_sex=1 and s_o_usermob_type=2 and i_o_ordesnum_3m=4…
2013-07-24 11:07 · mysql · infobright
mysql造数据
1.存储过程 DELIMITER $$ CREATE PROCEDURE `fact_user_msg_PROC`() BEGIN DECLARE iloop SMALLINT DEFAULT 0; DECLARE iNum MEDIUMINT DEFAULT 0; DECLARE tel bigint DEFAULT 13000000000; DECLARE uid int DEFAULT 0; DECLARE unicknme varchar(100) DEFAULT 'test'; WHILE iNum<=5000 DO START TRANSACTION; WHILE iloop<=…
2013-07-23 16:17 · mysql
对比mysql一般引擎与infobright
1.mysql与infobirght的配置 采用虚拟机: mysql:10.28.174.74 10.28.174.237 内存: 4g 3g cpu:双核 cpu MHz : 3309.71 2.测试程序python #! /usr/bin/env python #coding=utf-8 ################################## import MySQLdb,time,datetime #建立和数据库系统的连接 #conn_src = MySQLdb.connect(host='10.28.174.237', user='root',passwd='12345…
2013-07-23 14:27 · mysql
infobright安装
参考 http://blog.s135.com/infobright/ 1.官网下载www.infobright.org 2. tar zxvf infobright-4.0.7-0-linux-i686-ice.tar.gz cd infobright-4.0.7-0-linux-i686-ice ./install-infobright.sh --datadir=/data0/mysql/3307/data --cachedir=/data0/mysql/3307/cache --config=/data0/mysql/3307/my.cnf --port=3307 --socket=/…
2013-07-19 16:15 · mysql
mysql5.5.14安装
1.创建用户和用户组与赋予数据存放目录权限 groupadd -g 502 mysql useradd -u 502 -g mysql mysql 2.wget http://www.cmake.org/files/v2.8/cmake-2.8.5.tar.gz tar zxf cmake-2.8.5.tar.gz -C /usr/local/src cd /usr/local/src/cmake-2.8.5 ./configure make && make install 有时需要用到代理 export http_proxy=http://ip:port/ export ftp_proxy…