9394952

导航

sybase 优化总结[zt]

一. SYBASE 系统参数调整

1.内存

sp_configure "max memory",1500000 重启生效(设置为共享内存的75%)

sp_configure "allocate max shared mem",1 启动的时候自动分配max memory指定的最大内存

sp_cacheconfig "default data cache","1500m" 设置数据缓存(设置为max memory的一半)

sp_cacheconfig "default data cache","cache_partition=2" 是CPU数量的倍数,对数据缓冲区分区

sp_poolconfig "default data cache","64m","16k" 设置16K 数据缓存

sp_poolconfig "default data cache","128m","8k" 设置8K 数据缓存

sp_configure "procedure cache size",90000 存储过程数据缓存sp_cacheconfig 'tempdb_cache','200m','mixed' 创建命名高速缓存sp_bindcache 'tempdb_cache',tempdb 捆绑临时数据库到tempdb_cache高速缓存

2.cpu

sp_configure "max online engines",2 设置使用的CPU数量

sp_configure "number of engines at startup",2 启动时使用CPU数量

3. 网络

sp_configure "default network packet size",2048 设置网络传送包的大小(重启动生效)

sp_configure "max network packet size",2048

4. 其他资源使用

sp_configure "number of locks",100000 锁使用数量

sp_configure "number of open indexes",5000 打开索引

sp_configure "number of open objects",5000 打开对象

sp_configure "number of user connections",1000 用户连接数

sp_configure "number of device",100 新建设备最大数量

二. sybase 设备调整

数据设备与日志设备必须分开,添加临时数据库设备

1. 数据设备

sp_deviceattr devname,"dsync",true

2. 日志设备

sp_deviceattr devname,"dsync",false

3. 临时数据库设备

sp_deviceattr devname,"dsync",false

三. sybase 数据结构调整

1. 数据库对象表、索引。。

(1)对表新建合理的索引,定期分析表

update statistics tabname (不锁表)

(2)整理数据库空间 (锁表,剩余空间必须为最大表的1.2倍)

reorg rebuild tabname

recreate clustered index

(3)重新编译存储过程与触发器

sp_recompile usertable (与表相关联的存储过程和触发器)

四. sybase 数据库监控

1. 数据库死进程

select * from master..syslogshold

五. sybase 数据库启动参数

-T3607 master

-T3608 其他数据

-m 单

sybase 优化总结[zt] - 无名小辈 - BA7IB

摘自:http://feimei.itpub.net/post/10248/94191

posted on 2007-10-27 15:30  9394952  阅读(264)  评论(0编辑  收藏  举报