WO2005066835A1 - Procede d'extraction d'un enregistrement d'une page de donnees d'une base de donnees - Google Patents
Procede d'extraction d'un enregistrement d'une page de donnees d'une base de donnees Download PDFInfo
- Publication number
- WO2005066835A1 WO2005066835A1 PCT/CN2004/000668 CN2004000668W WO2005066835A1 WO 2005066835 A1 WO2005066835 A1 WO 2005066835A1 CN 2004000668 W CN2004000668 W CN 2004000668W WO 2005066835 A1 WO2005066835 A1 WO 2005066835A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- record
- dir
- slot
- records
- data page
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 32
- 230000007423 decrease Effects 0.000 abstract 1
- 230000001174 ascending effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2453—Query optimisation
- G06F16/24534—Query rewriting; Transformation
- G06F16/24547—Optimisations to support specific applications; Extensibility of optimisers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
Definitions
- the invention relates to a method for managing records in a data page in a database technology, in particular to a method for quickly locating records in a data page in a database. Background technique
- a database system is a very effective software system for managing large amounts of data.
- the smallest management unit in the database is a record, and each record records a set of related information.
- a data page is a physical unit that stores records. Multiple records can be stored on one page. Each record in the data page has a pointer that points to the next record.
- the records in the entire page are linked into a linear record chain. When searching for records, you can locate the specific record along the linear record chain. Of a record.
- Page search efficiency is very low, resulting in low database query efficiency.
- An object of the present invention is to provide a method for quickly locating records in a data page in a database, which can improve the speed of locating data records in a database.
- a directory structure is set at the end of the data page.
- the directory structure consists of a set of record offsets.
- a record offset is a record in a page.
- Position offset Each directory in the directory structure is called a dir-s lot, and each dir-s lot stores an offset of a record position. According to the position offset, a record can be located immediately. However, the position offset of each record is not recorded in dir-s lot. In this linear record chain in the data page, every certain number of records (the number of records is in the maximum limit of records in dir-s lot). And the minimum limit), take the offset of one record and store it in dir_s lot. In this way, each page has a directory structure.
- the present invention discloses a method for quickly locating records in a data page in a database, including the following steps: (1) A directory structure is set at the end of the data page.
- the directory structure is composed of a set of record offsets.
- a record offset is a position offset of a record in the page.
- Each directory in the directory structure is called dir—slot, each dir-slot stores an offset of a record position;
- the positioning algorithm is used to find related records in the dir-slot. After locating to a di.r_slot, according to the offset of the records stored in the dir-slot, the related set of records are sequentially searched for accurate positioning. Go to the record you are looking for.
- the method for quickly locating records in a data page in a database further includes placing a record to be checked in a field structure, and comparing the records in the data page with the field structure.
- the positioning algorithm is a dichotomy.
- the dichotomy query is to continuously take the intermediate value and compare it with the field structure until the value of up-low is not greater than 1.
- FIG. 1 is a structural description of a data page of the present invention
- FIG. 2 is a flowchart of adding a dir-slot according to the present invention
- FIG. 3 is a flowchart of deleting dir_slot according to the present invention.
- FIG. 4 is a flowchart of locating records in a data page according to the present invention. Best way to implement the invention
- Figure 1 shows the overall structure of a data page, which describes the complete structure of a data page.
- the first 26 bytes describe the attributes recorded on the page
- 26 to 36 bytes describe the attributes of the page
- 36 to 56 bytes are segment pointers
- dir_slot extends upward from the end of the page. This scheme is adopted It cleverly avoids that we reserve space for dir_slot. In this way, when adding or removing records, it is not necessary to consider how many records are currently stored and how many 'dir_slots are used.
- Figure 2 is a flow chart of adding dir_slot. It describes how to insert a record on a data page in the database. If the number of records on the dir-slot where the record has reached the maximum limit, how dir_slot 4 bar current dir-slot Split into two, so as to achieve the purpose of adding dir-slot.
- the record in each page is a linked list of records. When inserting a record, the record is inserted into the relevant position of the linked list, generally arranged in ascending order. As shown in FIG. 2, after inserting the linked list (step 201), first obtain the number of records on the dir-slot where the record is located (slot number is slot_no) (step 202), and then determine the dir-slot where the record is located.
- step 203 Whether the number of records exceeds the maximum limit (step 203), if the maximum limit is not exceeded, directly insert the log and end (step 212); if the maximum limit is exceeded, obtain the address of the dir-slot on the page slot ( Step 204), obtaining the number of records n-owned on the dir-slot (step 205), obtaining the address of the previous dir-slot prev-slot (step 206), and obtaining the record pointer on the prev-slot according to the rev_slot value ( Step 207), obtain the pointer recttr4 of the prev—slot / 2 record below the record (step 208), and shift the dir—slot greater than or equal to slot — no by one (step 209), so that a dir is added —Slot, and divide all records on the dir—slot where the record resides into two, that is, set the number of dir—slot records on slot-no to n—owned / 2, and bias the records on dir—slot Shift to
- Figure 3 is a dir-slot deletion flowchart, describing how to merge two dir-slots when the number of records on dir_slot is less than the minimum limit when deleting records. How does the system adjust the dir- slot when a record is deleted on a data page in the database.
- the record in each page is a linked list of records.
- When deleting a record remove the record from the linked list and set the delete flag (step 301). Then take the total number of records on the dir_slot where the record is located (step 302). If the total number of records is less than or equal to the minimum limit (step 303), then adjust the dir-slot.
- the next dir-slot Take a record from above and add it to the current dir-slot. Specifically, take the current dir-slot record pointer old_rec (step 310), and take the next record pointer of the record as new_rec (step 311). Set the record pointer of the current dir-slot to new rec (step 312). Set the current dir-slot and the record of the next dir-slot to new values (step 313), then record the delete log and end (step 314).
- step 308 move all dir_slots after the dir_slot forward by one (step 308), merge the dir_slot and the following dir_slot (step 309), record the delete log and end (step 314). This adjusts dir_slot.
- Figure 4 is a flowchart of locating records in a data page, which describes how to locate a record in a page and query a record on the data page.
- the value of the partial field of the record to be checked is placed in the field structure turbo (step 401).
- the so-called field structure turbo is a structure composed of the partial fields of the record to be checked.
- To query a record in the database you must know the Part of the content of the record, such as a personnel file database, can be queried through the name field.
- the name field constitutes a turbo).
- the record in the data page will be compared with the field structure.
- the method of dichotomy query is to continuously compare the intermediate value with the field structure until the value of up-low is not greater than 1. Specifically, the dichotomy is to compare the record of the middle value of the dir-slot on the page with the turple.
- the present invention has the beneficial effect that the speed of locating a record in a page by the present invention is greatly improved.
- it is not necessary to search and compare according to the record chain order, but to quickly locate and search the dir-slot in the directory organization. In this way, it saves a lot of sequential search overhead and locates the specific dir-slot.
- the maximum number of query comparisons is the maximum number of records in dir-slot. This method greatly saves the number of query comparisons. Because dir_slot is placed at the end of the page, there is no need to reserve space in the page, and page records are also managed very effectively. Because dir-slot is just an offset to store a record, it takes up very little space.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
Claims
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US10/584,010 US20070124279A1 (en) | 2003-12-31 | 2004-06-22 | Method for quickly retrieving a record in a data page of a database |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200310124201.4 | 2003-12-31 | ||
CNB2003101242014A CN1286043C (zh) | 2003-12-31 | 2003-12-31 | 一种在数据库里快速定位数据页中记录的方法 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2005066835A1 true WO2005066835A1 (fr) | 2005-07-21 |
Family
ID=34338975
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2004/000668 WO2005066835A1 (fr) | 2003-12-31 | 2004-06-22 | Procede d'extraction d'un enregistrement d'une page de donnees d'une base de donnees |
Country Status (3)
Country | Link |
---|---|
US (1) | US20070124279A1 (zh) |
CN (1) | CN1286043C (zh) |
WO (1) | WO2005066835A1 (zh) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101127045B (zh) * | 2007-09-25 | 2010-04-21 | 中兴通讯股份有限公司 | 数据库可重复读实现方法、装置及数据库管理系统 |
CN101477550B (zh) * | 2009-01-22 | 2012-12-12 | 华为终端有限公司 | 基于嵌入式设备的数据查找方法、装置及嵌入式设备 |
CN102004728B (zh) * | 2009-09-01 | 2013-03-27 | 三星电子(中国)研发中心 | 数据库游标位置保存及复位方法 |
CN102520242A (zh) * | 2011-12-12 | 2012-06-27 | 宁夏隆基宁光仪表有限公司 | 一种电能表负荷曲线的记录方法 |
CN102831196A (zh) * | 2012-08-03 | 2012-12-19 | 漳州科能电器有限公司 | 一种快速负荷记录数据查询方法及应用 |
CN104182522B (zh) * | 2014-08-26 | 2017-04-19 | 中国科学院信息工程研究所 | 一种基于循环位图模型的辅助索引方法及装置 |
CN104618358B (zh) * | 2015-01-21 | 2018-04-27 | 迈普通信技术股份有限公司 | 一种快速访问acl规则链的方法及系统 |
CN110837647B (zh) * | 2018-08-16 | 2022-11-08 | 迈普通信技术股份有限公司 | 管理访问控制列表的方法及装置 |
CN109753382B (zh) * | 2018-12-10 | 2022-01-07 | 厦门市美亚柏科信息股份有限公司 | 一种数据库删除记录的恢复方法及系统 |
CN112256650B (zh) * | 2020-10-20 | 2024-05-31 | 广州市百果园网络科技有限公司 | 存储空间管理方法、装置、设备及存储介质 |
CN112398227A (zh) * | 2020-11-16 | 2021-02-23 | 国网辽宁省电力有限公司辽阳供电公司 | 基于d5000电网调度系统的变压器负载率的自动告警方法 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5687361A (en) * | 1995-02-13 | 1997-11-11 | Unisys Corporation | System for managing and accessing a dynamically expanding computer database |
US5915425A (en) * | 1996-08-28 | 1999-06-29 | Thomas & Betts Corporation | Cable tie installation tool |
US6009425A (en) * | 1996-08-21 | 1999-12-28 | International Business Machines Corporation | System and method for performing record deletions using index scans |
CN1295295A (zh) * | 1999-11-04 | 2001-05-16 | 英业达集团(西安)电子技术有限公司 | 使用快速查询索引结构的电子字典单词查询方法 |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5379422A (en) * | 1992-01-16 | 1995-01-03 | Digital Equipment Corporation | Simple random sampling on pseudo-ranked hierarchical data structures in a data processing system |
JP3666907B2 (ja) * | 1994-10-20 | 2005-06-29 | 富士通株式会社 | データベース用ファイル格納管理システム |
US5884297A (en) * | 1996-01-30 | 1999-03-16 | Telefonaktiebolaget L M Ericsson (Publ.) | System and method for maintaining a table in content addressable memory using hole algorithms |
US5893086A (en) * | 1997-07-11 | 1999-04-06 | International Business Machines Corporation | Parallel file system and method with extensible hashing |
EP1211610A1 (en) * | 2000-11-29 | 2002-06-05 | Lafayette Software Inc. | Methods of organising data and processing queries in a database system |
EP1407386A2 (en) * | 2001-06-21 | 2004-04-14 | ISC, Inc. | Database indexing method and apparatus |
-
2003
- 2003-12-31 CN CNB2003101242014A patent/CN1286043C/zh not_active Expired - Lifetime
-
2004
- 2004-06-22 WO PCT/CN2004/000668 patent/WO2005066835A1/zh active Application Filing
- 2004-06-22 US US10/584,010 patent/US20070124279A1/en not_active Abandoned
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5687361A (en) * | 1995-02-13 | 1997-11-11 | Unisys Corporation | System for managing and accessing a dynamically expanding computer database |
US6009425A (en) * | 1996-08-21 | 1999-12-28 | International Business Machines Corporation | System and method for performing record deletions using index scans |
US5915425A (en) * | 1996-08-28 | 1999-06-29 | Thomas & Betts Corporation | Cable tie installation tool |
CN1295295A (zh) * | 1999-11-04 | 2001-05-16 | 英业达集团(西安)电子技术有限公司 | 使用快速查询索引结构的电子字典单词查询方法 |
Also Published As
Publication number | Publication date |
---|---|
US20070124279A1 (en) | 2007-05-31 |
CN1286043C (zh) | 2006-11-22 |
CN1556483A (zh) | 2004-12-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CA2281287C (en) | Method and system for efficiently searching for free space in a table of a relational database having a clustering index | |
US8335889B2 (en) | Content addressable storage systems and methods employing searchable blocks | |
US7496584B2 (en) | Incremental cardinality estimation for a set of data values | |
CN109471905B (zh) | 一种支持时间范围和属性范围复合查询的区块链索引方法 | |
US4677550A (en) | Method of compacting and searching a data index | |
CN100458779C (zh) | 扩展索引的方法 | |
US20100114843A1 (en) | Index Compression In Databases | |
US8472289B2 (en) | Static TOC indexing system and method | |
JP2010157204A (ja) | 検索可能なブロックを用いた連想記憶システムおよびその方法 | |
CN100433019C (zh) | 一种数据存储与检索的方法及系统 | |
WO2005066835A1 (fr) | Procede d'extraction d'un enregistrement d'une page de donnees d'une base de donnees | |
CN101256579A (zh) | 一种数据库范围查询数据组织的方法 | |
CN108984626B (zh) | 一种数据处理方法、装置及服务器 | |
CN107644033A (zh) | 一种在非关系型数据库中进行数据查询的方法与设备 | |
CA2325252C (en) | Maintaining very large indexes supporting efficient relational querying | |
CN108021472B (zh) | ReFS文件系统的格式化恢复方法及存储介质 | |
US20080071732A1 (en) | Master/slave index in computer systems | |
CN112463837B (zh) | 一种关系型数据库数据存储查询方法 | |
CN1287316C (zh) | 在索引高键码生成期间压缩变长列的方法和系统 | |
US7966292B1 (en) | Index processing | |
JP2003030040A (ja) | オブジェクトデータベースシステムの複数ハッシュインデックスおよび非ユニークインデックス管理方式 | |
CN108460067B (zh) | 基于数据的瓦片索引结构、索引构建方法和数据检索方法 | |
CN107357901B (zh) | 一种视频文件快速检索方法及系统 | |
EP2164005A2 (en) | Content addressable storage systems and methods employing searchable blocks | |
JP3649472B2 (ja) | 情報検索装置 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AK | Designated states |
Kind code of ref document: A1 Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BW BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE EG ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NA NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL SY TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW |
|
AL | Designated countries for regional patents |
Kind code of ref document: A1 Designated state(s): GM KE LS MW MZ NA SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IT LU MC NL PL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG |
|
121 | Ep: the epo has been informed by wipo that ep was designated in this application | ||
WWE | Wipo information: entry into national phase |
Ref document number: 10584010 Country of ref document: US Ref document number: 2007124279 Country of ref document: US |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
WWW | Wipo information: withdrawn in national office |
Ref document number: DE |
|
WWE | Wipo information: entry into national phase |
Ref document number: 4091/DELNP/2006 Country of ref document: IN |
|
122 | Ep: pct application non-entry in european phase | ||
WWP | Wipo information: published in national office |
Ref document number: 10584010 Country of ref document: US |