Browse Prior Art Database

Hot Pages First DB2 Database Table Scan

IP.com Disclosure Number: IPCOM000124666D
Original Publication Date: 2005-May-03
Included in the Prior Art Database: 2005-May-03
Document File: 1 page(s) / 43K

Publishing Venue

IBM

Abstract

A database table scan intelligently scans the table's pages which are currently in memory before loading any of the table's pages from disk. Thus, disk IO incurred to scan the table is minimized.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 52% of the total text.

Page 1 of 1

Hot Pages First DB2 Database Table Scan

Disclosed is a program which scans a database table's memory resident pages before loading any pages from disk in order to minimize disk IO.

     A large percentage of database queries use a table scan somewhere in their query access plan. Prior art scans blocks of the table from block 1 to block n. "Exchanging" of memory ( e.g., load block i +1 over block i -1 while currently scanning block i ) is done on the scan so that a small footprint and efficient use of memory is achieved.

     For pages of the table already in memory (from previous query or other system activity), disk IO is saved since the file is detected in memory. However, this benefit is haphazardly achieved, and often missed in the prior art especially in memory constrained environments because it may be the case that the page in memory has not been referenced for a while and gets bumped out for a page the table scan needs. After bumping this page out, the table scan may later call it back into memory when it is needed by the scan. Thus, the table scan thrashes. So if a particular table is scanned over and over in a memory constrained environment, it will incur n IOs for n pages since it always overwrites the last pages from a previous scan with the first pages from the current scan.

     An intelligent table scan is, therefore, invented. Thus, all pages of the table being scanned currently in mainstore will be referenced first before loading any pages from disk. Thus, the potential for thrashing due to the table scan is minimized. As a simple example, if a...