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:
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,
Post an idea
Upvote ideas that matter most to you
Get feedback from the IBM team to refine your idea
Help IBM prioritize your ideas and requests
The IBM team may need your help to refine the ideas so they may ask for more information or feedback. The product management team will then decide if they can begin working on your idea. If they can start during the next development cycle, they will put the idea on the priority list. Each team at IBM works on a different schedule, where some ideas can be implemented right away, others may be placed on a different schedule.
Receive notification on the decision
Some ideas can be implemented at IBM, while others may not fit within the development plans for the product. In either case, the team will let you know as soon as possible. In some cases, we may be able to find alternatives for ideas which cannot be implemented in a reasonable time.
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.
Do not place IBM confidential, company confidential, or personal information into any field.