The invention discloses a method and a device for monitoring the database, based on the table, the method includes: collection table extended interval information monitoring, according to the information obtained from the extended interval extended interval single table current dispersion index; extended interval dispersion index value and the current extended interval dispersion compared to a single table the normal value, if the index value is greater than or equal to the normal value, you need to watch state monitoring is normal; otherwise, the extended interval dispersion index value and the current extended interval single table dispersion degree of deterioration value, if the index value is greater than or equal to the deterioration of value, need to monitor the performance problems otherwise, the need to monitor; the table structure reconstruction optimization. The invention improves the continuity of the block or the page in the database table and the operation performance of the table in the database, realizes the effective monitoring and the repair of the database performance, and ensures the realization of the database performance.
【技术实现步骤摘要】
一种基于表的数据库监控方法和装置
本专利技术涉及通信领域中数据库
,具体地,涉及基于表的数据库监控方法及装置。
技术介绍
目前数据库已经是绝大多数IT应用的核心,随着多层体系结构以及SOA的发展,应用逻辑实现前移,此时,数据库性能方面的需求与其功能相比较,变得越加突出。因此,提高数据库性能及其监控手段是当前面临的一个主要问题。目前联机事务处理应用系统主要使用关系型数据库,随着数据时代的到来,数据量逐年递增,数据库呈TB级增长,且应用越来越复杂。一般数据库应用系统上线初期基本满足系统需求,而当应用运行一段时间,数据量和并发数达到一定程度,数据库应用系统性能会出现明显下降。公开号为CN101158916的中国专利申请提供了一种数据库性能监控方法,通过综合性能指标:(CPU等待时间+I/O等待时间)/数据库总等待时间*100%,将该指标与预先设定的正常指标值/性能恶劣指标值进行比较,从而有效监控数据库性能情况,然后进行优化。公开号为CN101989283的中国专利申请提供了一种数据库性能的监控方法和装置:创建需要采集的各级别的性能指标,并到数据库中采集性能指标值; ...
【技术保护点】
一种基于表的数据库监控方法,其特征在于,包括:采集需要监控的表的扩展区间信息,根据所述扩展区间信息获得单个表的扩展区间分散程度当前指标值;将所述扩展区间分散程度当前指标值与单个表的扩展区间分散程度正常值进行比较,如果当前指标值大于等于正常值,则所述需要监控的表的状态正常;否则,将所述扩展区间分散程度当前指标值再与单个表的扩展区间分散程度恶化值进行比较,如果当前指标值大于等于恶化值,则所述需要监控的表的性能存在问题;否则,对所述需要监控的表进行结构重建优化处理。
【技术特征摘要】
1.一种基于表的数据库监控方法,其特征在于,包括:采集需要监控的表的扩展区间信息,根据所述扩展区间信息获得单个表的扩展区间分散程度当前指标值;将所述扩展区间分散程度当前指标值与单个表的扩展区间分散程度正常值进行比较,如果当前指标值大于等于正常值,则所述需要监控的表的状态正常;否则,将所述扩展区间分散程度当前指标值再与单个表的扩展区间分散程度恶化值进行比较,如果当前指标值大于等于恶化值,则所述需要监控的表的性能存在问题;否则,对所述需要监控的表进行结构重建优化处理。2.根据权利要求1所述的方法,其特征在于,所述对所述需要监控的表进行结构重建优化处理的步骤包括:采集需要重建优化的表的基本信息,根据所述基本信息确定优化参数值;根据所述优化参数值创建新表,并根据所述表的基本信息创建所述新表的基本信息;删除所述表,并将所述新表重新命名。3.根据权利要求2所述的方法,其特征在于,在所述采集需要重建优化的表的基本信息的步骤之前还包括:设置需要重建优化的表的重建优化时间段,在所述重建优化时间段内,确保无用户占用所述表锁资源;判断当前时间是否处于表的所述重建优化时间段,如果不是,则继续循环等待。4.根据权利要求3所述的方法,其特征在于,在所述删除表的步骤与将所述新表重新命名的步骤之间还包括:如果所述表删除成功,则将所述新表重新命名;否则,删除所述新表,继续对所述需要监控的表进行结构重建优化处理。5.根据权利要求1所述的方法,其特征在于,如果所述需要监控的表的性能存在问题,则发出性能存在问题的告警,在适当时机对所述性能存在问题的表进行结构重建优化处理。6.一种基于表的数据库监控装置,其特征在于,包括:指标获取模块,用于采集需要监控的表的扩展区间信息,根据...
【专利技术属性】
技术研发人员:付永振,李京红,魏春来,杨朝晖,刘艳青,
申请(专利权)人:中国移动通信集团河北有限公司,
类型:发明
国别省市:河北,13
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。