一句话总结

数据库优化是DBA最主要的工作之一,我们说数据库的优化顺序为:IO优化、网络优化、内存优化、cache优化、cpu优化。


IO优化包括选择什么样的存储技术,怎么做raid,将不同类型的数据文件放在不同的磁盘上、采用异步IO等来减少IO争用,
使用分区技术、压缩技术、为表创建index 等来就少单次操作的IO,将数据与索引分开来提高效率。


database optimization is one of the most important work of DBA, 
we say that the database optimizer order is: IO, network, memory, cache optimization, cpu optimization. 
IO optimization include selecting what kind of storage technology, how do the raid, put the different types of data files on different disks or Using asynchronous IO in orde to reduce IO contention; 
using partitioning、compression technology、optimized SQL execution plan, to reduce the IO operation.Separate the data and the index to improve efficiency


内存优化也是实例级优化的一个重要部分,包括使用64bit的操作系统来突破单个进程内存使用的限制,使用大页(HugePages)来优化内存,使用大的SGA来缓存数据,避免物理IO和数据的SWAPP;在oracle OLAP系统中使用大的PGA来增加内存排序,减少IO排序等。


memory optimization is alse an important part of Instance-level optimization, 
including the use of a 64bit OS system to break out single process memory usage limit, 
using large hugepages to optimize memory, using a large SGA to cache data and avoid physical IO and data SWAPP, 
the oracle OLAP system use large PGA memory for sort, reduce IO operating.


网络优化:在一些对网络依赖很大的架构中,如oracle的ODG\OGG\RAC,MYSQL的cluster、slav架构,使用千兆、万兆网络来实现节点间的快速通讯。
修改linux网络参数来优化网络效率,如在aix中修改udp_sendspace 来提高tcp的最大发送窗口。


Network optimization: In some greatly dependent on the architecture of the network, as the oracle of the ODG、OGG、RAC, 
MYSQL the cluster, slav architecture, the use of Thousand bit or more to achieve fast communication between nodes.
Modify linux network parameters to optimize network efficiency, such as in aix modify udp_sendspace to increase the maximum transmission tcp window




cpu优化:使用绑定变量来就少硬解析、合理排序、减少比较等操作。使用并行执行来充分利用多核CPU的优势


cpu optimization: using bind variables to less hard analysis, rational sort, reducing the comparison operation and so on.
Using parallel execution to take advantage of the advantages of multi-core CPU




SQL优化:定期收集统计信息,选择基于cost的优化算法,创建索引。


SQL optimization: regularly collect statistical information of your data, selection cost optimizer, create the index to reduce IO operating.




2)管理数据库
--巡检 : 包括表空间使用率巡检、错误日志巡检、重要数据库参数、日常备份是否成功、数据库主要进程的
database inspection :Including the table space usage logging, error log inspection, important database parameters, the daily backup is successful, the database key processes
        
--日常备份:制定并部署有效的备份策略,在系统负载空闲的时段做数据库备份
Daily Backup: to develop and deploy effective backup strategy,  do a database backup when the system load idle time.




--安全:强化口令、用户权限的管理,做好用户行为的审计工作。
Security: strengthening management passwords, user rights ; do good work for user behavior audit .

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值