<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ubuntu,debian,redhat -linuxany.com &#187; 8.Database</title>
	<atom:link href="http://www.linuxany.com/archives/category/database/feed" rel="self" type="application/rss+xml" />
	<link>http://www.linuxany.com</link>
	<description></description>
	<lastBuildDate>Thu, 26 Jan 2012 08:59:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>MySQL 数据库性能优化之SQL优化</title>
		<link>http://www.linuxany.com/archives/1926.html</link>
		<comments>http://www.linuxany.com/archives/1926.html#comments</comments>
		<pubDate>Sun, 04 Dec 2011 14:40:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[select]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1926</guid>
		<description><![CDATA[注：这篇文章是以 MySQL 为背景，很多内容同时适用于其他关系型数据库，需要有一些索引知识为基础 优化目标 减少 IO 次数 IO永远是数据库最容易瓶颈的地方，这是由数据库的职责所决定的，大部分数据库操作中超过90%的时间都是 IO 操作所占用的，减少 IO 次数是 SQL 优化中需要第一优先考虑，当然，也是收效最明显的优化手段。 降低 CPU 计算 除了 IO 瓶颈之外，SQL优化中需要考虑的就是 CPU 运算量的优化了。order by, group by,distinct … 都是消耗 CPU 的大户（这些操作基本上都是 CPU 处理内存中的数据比较运算）。当我们的 IO 优化做到一定阶段之后，降低 CPU 计算也就成为了我们 SQL 优化的重要目标 优化方法 改变 SQL 执行计划 明确了优化目标之后，我们需要确定达到我们目标的方法。对于 SQL 语句来说，达到上述2个目标的方法其实只有一个，那就是改变 SQL 的执行计划，让他尽量“少走弯路”，尽量通过各种“捷径”来找到我们需要的数据，以达到 “减少 IO 次数” 和 “降低 CPU 计算” 的目标 常见误区 [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1926.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL show系列命令总结</title>
		<link>http://www.linuxany.com/archives/1920.html</link>
		<comments>http://www.linuxany.com/archives/1920.html#comments</comments>
		<pubDate>Sun, 04 Dec 2011 14:13:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[grants]]></category>
		<category><![CDATA[show]]></category>
		<category><![CDATA[status]]></category>
		<category><![CDATA[tables]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1920</guid>
		<description><![CDATA[01、show tables或show tables from database_name; — 显示当前数据库中所有表的名称 02、show databases; — 显示mysql中所有数据库的名称 03、show columns from table_name from database_name; 或show columns from database_name.table_name; — 显示表中列名称 04、show grants for user_name; — 显示一个用户的权限，显示结果类似于grant 命令 05、show index from table_name; — 显示表的索引 06、show status; — 显示一些系统特定资源的信息，例如，正在运行的线程数量 07、show variables; — 显示系统变量的名称和值 08、show processlist; — 显示系统中正在运行的所有进程，也就是当前正在执行的查询。大多数用户可以查看他们自己的进程，但是如果他们拥有process权限，就可以查看所有人的进程，包括密码。 09、show table status; — 显示当前使用或者指定的database中的每个表的信息。信息包括表类型和表的最新更新时间 10、show privileges; [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1920.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle 三种高可用集群方案</title>
		<link>http://www.linuxany.com/archives/1915.html</link>
		<comments>http://www.linuxany.com/archives/1915.html#comments</comments>
		<pubDate>Sun, 04 Dec 2011 13:50:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[dataguard]]></category>
		<category><![CDATA[goldengate]]></category>
		<category><![CDATA[maa]]></category>
		<category><![CDATA[rac]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1915</guid>
		<description><![CDATA[1. RAC RAC, Real Application Clusters 多个Oracle服务器组成一个共享的Cache，而这些Oracle服务器共享一个基于网络的存储。这个系统可以容忍单机/或是多机失败。 不过系统内部的多个节点需要高速网络互连，基本上也就是要全部东西放在在一个机房内，或者说一个数据中心内。如果机房出故障，比如网络不通，那就坏了。所以仅仅用RAC还是满足不了一般互联网公司的重要业务的需要，重要业务需要多机房来容忍单个机房的事故。 2. Data Guard. Data Guard这个方案就适合多机房的。某机房一个production的数据库，另外其他机房部署standby的数据库。Standby数据库分物理的和逻辑的。物理的standby数据库主要用于production失败后做切换。而逻辑的standby数据库则在平时可以分担production数据库的读负载。 3. MAA MAA(Maximum Availability Architecture)其实不是独立的第三种，而是前面两种的结合，来提供最高的可用性。 每个机房内部署RAC集群，多个机房间用Data Guard同步。 参考资料： http://vnull.pcnet.com.pl/dl/oracle/Managing_Performance_for_RAC_1027041.pdf http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10726.pdf 您还可能感兴趣的内容mod_python及psp开发配置Linux Shell Script: 時間計算mysql+mmm+proxy实现数据库读写分离及高可用HA ssh限制访问Apache Tips: Disable the HTTP TRACE method]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1915.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle 免安装客户端软件-使用pl/sql配置登陆</title>
		<link>http://www.linuxany.com/archives/1899.html</link>
		<comments>http://www.linuxany.com/archives/1899.html#comments</comments>
		<pubDate>Mon, 28 Nov 2011 07:55:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[plsql]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1899</guid>
		<description><![CDATA[1.下载Oracle Client Package . 从http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html下载 Instant Client Package – Basic包 标注:All files required to run OCI, OCCI, and JDBC-OCI applications) 2.本地保存Oracle Client Package: 创建文件夹,比如oracle_client,将下载的文件加压缩到此文件夹里.(笔者目录: D:\oracle_client\instantclient_10_2) 3.在当前目录下,新建立两个文件，sqlnet.ora和tnsnames.ora然后再手动配置sqlnet.ora和tnsnames.ora 比如这里是: sqlnet.ora文件内容: SQLNET.AUTHENTICATION_SERVICES= (NTS)NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT) tnsnames.ora文件内容(斜体表示需要替换的内容): orcl=(DESCRIPTION =&#160;&#160; &#160;(ADDRESS_LIST =&#160;&#160; &#160; &#160;(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.103)(PORT = 1521))&#160;&#160; &#160;)&#160;&#160; &#160;(CONNECT_DATA =&#160;&#160; &#160; &#160;(SERVICE_NAME = orcl)&#160;&#160; &#160;)) [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1899.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL 压力测试工具</title>
		<link>http://www.linuxany.com/archives/1651.html</link>
		<comments>http://www.linuxany.com/archives/1651.html#comments</comments>
		<pubDate>Mon, 29 Aug 2011 14:47:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Performents]]></category>
		<category><![CDATA[JDBHammer]]></category>
		<category><![CDATA[mysqlslap]]></category>
		<category><![CDATA[SysBench]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1651</guid>
		<description><![CDATA[第一、mysqlslap MySQL从5.1.4版开始带有一个压力测试工具mysqlslap，通过模拟多个并发客户端访问mysql来执行测试，使用起来非常的简单。通过mysqlslap –help可以获得可用的选项，这里列一些主要的参数，更详细的说明参考官方手册。 –auto-generate-sql, -a 自动生成测试表和数据 –auto-generate-sql-load-type=type 测试语句的类型。取值包括：read，key，write，update和mixed(默认)。 –number-char-cols=N, -x N 自动生成的测试表中包含多少个字符类型的列，默认1 –number-int-cols=N, -y N 自动生成的测试表中包含多少个数字类型的列，默认1 –number-of-queries=N 总的测试查询次数 –query=name,-q 使用自定义脚本执行测试，例如可以调用自定义的一个存储过程或者sql语句来执行测试。 –create-schema 测试的schema，MySQL中schema也就是database –commint=N 多少条DML后提交一次 –compress, -C 如果服务器和客户端支持都压缩，则压缩信息传递 –concurrency=N, -c N 并发量，也就是模拟多少个客户端同时执行select。可指定多个值，以逗号或者–delimiter参数指定的值做为分隔符 –engine=engine_name, -e engine_name 创建测试表所使用的存储引擎，可指定多个 –iterations=N, -i N 测试执行的迭代次数 –detach=N 执行N条语句后断开重连 –debug-info, -T 打印内存和CPU的信息 –only-print 只打印测试语句而不实际执行 测试的过程需要生成测试表，插入测试数据，这个mysqlslap可以自动生成，默认生成一个mysqlslap的schema，如果已经存在则先删除，这里要注意了，不要用–create-schema指定已经存在的库，否则后果可能很严重。可以用–only-print来打印实际的测试过程： $mysqlslap -a --only-printDROP SCHEMA IF EXISTS `mysqlslap`;CREATE SCHEMA [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1651.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL 减少主从数据同步延迟的几个方案</title>
		<link>http://www.linuxany.com/archives/1632.html</link>
		<comments>http://www.linuxany.com/archives/1632.html#comments</comments>
		<pubDate>Sun, 28 Aug 2011 16:09:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[master]]></category>
		<category><![CDATA[slave]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1632</guid>
		<description><![CDATA[基于局域网的master/slave机制在通常情况下已经可以满足’实时’备份的要求了。如果延迟比较大，就先确认以下几个因素： 1. 网络延迟2. master负载3. slave负载 另外，再介绍2个可以减少延迟的参数 –slave-net-timeout=seconds&#160; &#160; &#160;单位为秒 默认设置为 3600秒 参数含义：当slave从主数据库读取log数据失败后，等待多久重新建立连接并获取数据 –master-connect-retry=seconds&#160; &#160;单位为秒 默认设置为 60秒 参数含义：当重新建立主从连接时，如果连接建立失败，间隔多久后重试。 您还可能感兴趣的内容MySQL的Master/Slave同步状态查询]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1632.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Amoeba实现DB主从读写分离</title>
		<link>http://www.linuxany.com/archives/1624.html</link>
		<comments>http://www.linuxany.com/archives/1624.html#comments</comments>
		<pubDate>Sun, 28 Aug 2011 15:44:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[amoeba]]></category>
		<category><![CDATA[ha-proxy]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1624</guid>
		<description><![CDATA[Amoeba的简介 Amoeba(变形虫)项目,专注分布式数据proxy 开发.座落与Client、DB Server(s)之间.对客户端透明.具有负载均衡、高可用性、sql过滤、读写分离、可路由相关的query到目标数据库、可并发请求多台数据库合并结果. 主要解决了哪些问题： • 降低数据切分带来的复杂多数据库结构• 提供切分规则并降低数据切分规则给应用带来的影响• 降低db 与客户端的连接数• 读写分离 这里关于mysql的安装就不说了,网上的教程比较多. 实现mysql的主从复制 在master服务器上执行如下命令: #mysql –uroot –ptestmysql&#62; grant replication slave,file on *.* to 'linuxany'@'10.10.0.77' identified by '123456';mysql&#62; flush privileges;mysql&#62; exit; //修改master的my.cnf的配置 log-bin=mysql-bin&#160; &#160; &#160; &#160; &#160; &#160; //打开mysql二进制日志server-id = 1&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; //设置mysql_id，主从不能相同binlog-do-db=test&#160; &#160; &#160; &#160; &#160; &#160; //设置二进制日志记录的库sync_binlog=1 //修改slave的my.cnf的配置 [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1624.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

