首页> 外国专利> Data base optimization method for estimating query and trigger procedure costs

Data base optimization method for estimating query and trigger procedure costs

机译:用于估计查询和触发过程成本的数据库优化方法

摘要

The method of the invention estimates a total processing cost incident to execution of a query statement in respect of a relational database, wherein execution of the query statement results in a further execution of a trigger procedure. The method first estimates the query statement's costs by analyzing components of the query statement to determine a processing time there for in relation to a database table that is the target of the query statement. The method then determines the number of rows that are affected in the database table as a result of execution of the query statement. Next, components of a trigger procedure that is invoked in response to execution of the query statement are analyzed to determine a “base cost” for a single execution of the trigger procedure visa-vis data that is contained in a single row of the database table. The components of the trigger procedure are next analyzed to determine a per row cost for execution of the trigger procedure. The per row cost is determined from an estimate of time required for execution of the trigger procedure for a single row and from an estimate of time required for execution of the trigger procedure for a plurality of rows. Thereafter, the total processing cost of a query statement is calculated by adding the query statement cost to a sum of the either (i) the base cost if only one row is subjected to the query statement or (ii) the per row cost, multiplied by the number of rows affected by the query statement.
机译:本发明的方法估计关于关系数据库的查询语句的执行所涉及的总处理成本,其中查询语句的执行导致触发过程的进一步执行。该方法首先通过分析查询语句的组件以确定相对于作为查询语句目标的数据库表的处理时间来估计查询语句的成本。然后,该方法确定由于执行查询语句而在数据库表中受影响的行数。接下来,分析响应于查询语句的执行而调用的触发过程的组件,以确定“基本成本”。对于触发程序的一次执行,签证数据在数据库表的单行中包含。接下来,分析触发过程的组件以确定执行触发过程的每行成本。每行成本是根据对单行执行触发过程所需的时间估计以及对多行执行触发过程所需的时间估计来确定的。此后,通过将查询语句成本加到(i)如果仅一行要经受查询语句的基础成本或(ii)每行成本乘以以下各项的总和来计算查询语句的总处理成本:受查询语句影响的行数。

著录项

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号