Skip to Main Content
IBM Data and AI Ideas Portal for Customers


This portal is to open public enhancement requests against products and services offered by the IBM Data & AI organization. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).


Shape the future of IBM!

We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:


Search existing ideas

Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,


Post your ideas

Post ideas and requests to enhance a product or service. Take a look at ideas others have posted and upvote them if they matter to you,

  1. Post an idea

  2. Upvote ideas that matter most to you

  3. Get feedback from the IBM team to refine your idea


Specific links you will want to bookmark for future use

Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.

IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.

ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.

IBM Employees should enter Ideas at https://ideas.ibm.com


Status Not under consideration
Workspace Db2
Created by Guest
Created on Aug 26, 2016

Use FSCR information to ommit empty data pages while performing Table Scan (TBSCAN)

ABSTRACT:
Table scan over volatile table with large number of empty pages scans all empty pages instead of using FSCR to find pages to be scanned.


VERSION INFORMATION:
DB2 9.7.FP5 on Linux / DB2 9.7.FP9a on AIX 7.1 / DB2 10.5.FP4 on Linux


TECHNICAL INFORMATION:
In this scenario SQL replication uses staging tables - the tables are filled and then emptied regularly (reorg table is not a solution for this case). Some of them has grown quite large exceeding 400 thousand pages. These tables have no indexes on them, thus any SQL run against the tables uses table scan.

As was found out, even when the table is empty with no rows (all data pages are empty) the table scan causes engine to scan all the empty pages. This leads to increased CPU utilization and negative performance impact. It seems that DB2 does not use the information from FSCR to avoid reading empty pages, which seems to be a logical solution to this problem. Altering the table as volatile does not have any impact on the problem.


REQUIRED ACTION:
Implement a solution that ommits scanning of empty data pages when performing Table Scan.

This above scenario can be easily solved by appropriately scanning pages identified by FSCR and held locks. Namely if a table scan is chosen by the optimizer, then DB2 shall read all the pages identified as not empty thru FSCR, and additionally (depending on the isolation level) all the empty pages, that have still exclusive locks on them. Such empty page with exclusive lock on it means, the page was not empty before, and was emptied by a delete, which is not committed yet. In such a case a UNCOMMITTED READ isolation level does not need to read the empty pages, as it will not find any data there. But for example COMMITTED READ isolation level still has to go thru the empty pages, which still have locks on them, as there might be deleted rows, that were not committed yet. This solution causes that empty pages, that were commited (there are no locks on them) do not have to be read anymore, thus improving performance and lowering the amount of resources required for queries performing such table scans. Such solution, for all isolation levels other than UNCOMMITTED READ, still requires going thru lock list to check if there are any locks placed on empty pages, but it is much shorter and less resource consuming than reading all the empty pages from disk.

This kind of solution is implemented successfully in IBM Informix Dynamic Server for decades. As DB2 got different mechanims like HADR, partitioned tables, db2pd, etc. from Informix Dynamic Server, then maybe it shall also get optimal table scan from Informix as well.