首页> 外国专利> Method and system for efficiently searching for free space in a table of a relational database having a clustering index

Method and system for efficiently searching for free space in a table of a relational database having a clustering index

机译:在具有聚类索引的关系数据库的表中有效搜索可用空间的方法和系统

摘要

A method of searching a table in a database management system for free space for inserting a new record into the table. The table resides in a storage media, and includes a series of pages capable of storing a plurality of records. The table has a clustering index defined in a column of the table. The new record has a new record attribute for storing in the column of the table when the new record is stored in the table. The method comprises searching for a target page in the series of pages, the target page being selected to maintain clustering when the new record is inserted thereon. Once the target page has been located, it is searched for sufficient free space to accommodate the new record. If sufficient free space is found on the target page, then the new record is inserted on the target page. If sufficient free space is not found on the target page, then a target neighborhood of pages in the series of pages is searched for sufficient free space to accommodate the new record. The target neighborhood of pages surrounds the target page. If sufficient free space is found on a page in a target neighborhood of pages, then the new record is inserted on to this page in the target neighborhood of pages. If sufficient free space is not found in the target neighborhood of pages, then the method further comprises searching for sufficient free space to accommodate the new record outside the target neighborhood of pages. If sufficient free space is found outside the target neighborhood of pages, then the new record is inserted on a non-neighboring page outside the target neighborhood of pages. If sufficient free space is not found outside the target neighborhood of pages, then a new page having the new record is appended to the end of table.
机译:一种在数据库管理系统中的表中搜索可用空间以将新记录插入表中的方法。该表驻留在存储介质中,并且包括能够存储多个记录的一系列页面。该表具有在表的列中定义的聚簇索引。新记录具有新记录属性,当新记录存储在表中时,该属性将存储在表的列中。该方法包括在一系列页面中搜索目标页面,当在其上插入新记录时,选择目标页面以维持聚类。找到目标页面后,将在其中搜索足够的可用空间以容纳新记录。如果在目标页面上找到足够的可用空间,则新记录将插入到目标页面上。如果在目标页面上找不到足够的可用空间,则将在一系列页面中的目标页面邻域中搜索足够的可用空间来容纳新记录。页面的目标邻域围绕目标页面。如果在目标页面附近的页面上找到足够的可用空间,则新记录将插入目标页面附近的该页面上。如果在页面的目标邻域中没有找到足够的可用空间,则该方法还包括搜索足够的空闲空间以在页面的目标邻域之外容纳新记录。如果在页面目标邻域外找到足够的可用空间,则新记录将插入到目标页面邻域外的非相邻页面上。如果在页面的目标邻域之外找不到足够的可用空间,则将具有新记录的新页面附加到表的末尾。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号