IBM Data and AI

Welcome to the IBM Data and AI Ideas Portal for Clients!

We welcome and appreciate your feedback on IBM Data and AI Products to help make them even better than they are today!
Before you submit an idea, please perform a search first as a similar idea may have already been reported in the portal. If a related idea is not yet listed, please create a new idea and include with it a description which includes expected behavior as well as why having this feature would improve the service and how it would address your use case.
IBM Employees:
Clients:
  • Our team welcomes any feedback and suggestions you have for improving our offerings / products! This forum allows us to connect your offering / product improvement ideas with IBM product and engineering teams.

  • If you have not registered on this portal please click on the following link and register. To complete registration you will need to open the email you will receive from Aha to confirm your identity. http://ibm.biz/IBM-Data-and-AI-Portal-Register

Additional Information:
  • The shorter URL for this site is: https://ibm.biz/IBM-Data-and-AI-Ideas

  • To view our roadmaps: http://ibm.biz/Data-and-AI-Roadmaps

  • Reminder: This is not the place to submit defects or support needs, please use normal support channel for these cases

  • Please do not use the Ideas Portal for reporting bugs - we ask that you report bugs or issues with the product by contacting IBM support.

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.
  • Avatar32.5fb70cce7410889e661286fd7f1897de Guest
  • Jan 3 2019
  • Not Under Consideration
Idea Priority High
Customer Name IBM
  • Attach files

NOTICE TO EU RESIDENTS: per EU Data Protection Policy, if you wish to remove your personal information from the IBM ideas portal, please login to the ideas portal using your previously registered information then change your email to "anonymous@euprivacy.out" and first name to "anonymous" and last name to "anonymous". This will ensure that IBM will not send any emails to you about all idea submissions