1 /* 2 3 Derby - Class org.apache.derby.iapi.store.access.ScanInfo 4 5 Licensed to the Apache Software Foundation (ASF) under one or more 6 contributor license agreements. See the NOTICE file distributed with 7 this work for additional information regarding copyright ownership. 8 The ASF licenses this file to you under the Apache License, Version 2.0 9 (the "License"); you may not use this file except in compliance with 10 the License. You may obtain a copy of the License at 11 12 http://www.apache.org/licenses/LICENSE-2.0 13 14 Unless required by applicable law or agreed to in writing, software 15 distributed under the License is distributed on an "AS IS" BASIS, 16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 See the License for the specific language governing permissions and 18 limitations under the License. 19 20 */ 21 22 package org.apache.derby.iapi.store.access; 23 24 import org.apache.derby.iapi.error.StandardException; 25 26 import java.util.Properties; 27 28 /** 29 30 This object provides performance information related to an open scan. 31 The information is accumulated during operations on a ScanController() and 32 then copied into this object and returned by a call to 33 ScanController.getStatistic(). 34 35 @see GenericScanController#getScanInfo() 36 37 **/ 38 39 public interface ScanInfo 40 { 41 /** 42 * Return all information gathered about the scan. 43 * <p> 44 * This routine returns a list of properties which contains all information 45 * gathered about the scan. If a Property is passed in, then that property 46 * list is appeneded to, otherwise a new property object is created and 47 * returned. 48 * <p> 49 * Not all scans may support all properties, if the property is not 50 * supported then it will not be returned. The following is a list of 51 * properties that may be returned. These names have been internationalized, 52 * the names shown here are the old, non-internationalized names: 53 * 54 * scanType 55 * - type of the scan being performed: 56 * btree 57 * heap 58 * sort 59 * numPagesVisited 60 * - the number of pages visited during the scan. For btree scans 61 * this number only includes the leaf pages visited. 62 * numDeletedRowsVisited 63 * - the number of deleted rows visited during the scan. This 64 * number includes only those rows marked deleted. 65 * numRowsVisited 66 * - the number of rows visited during the scan. This number 67 * includes all rows, including: those marked deleted, those 68 * that don't meet qualification, ... 69 * numRowsQualified 70 * - the number of rows which met the qualification. 71 * treeHeight (btree's only) 72 * - for btree's the height of the tree. A tree with one page 73 * has a height of 1. Total number of pages visited in a btree 74 * scan is (treeHeight - 1 + numPagesVisited). 75 * numColumnsFetched 76 * - the number of columns Fetched - partial scans will result 77 * in fetching less columns than the total number in the scan. 78 * columnsFetchedBitSet 79 * - The BitSet.toString() method called on the validColumns arg. 80 * to the scan, unless validColumns was set to null, and in that 81 * case we will return "all". 82 * NOTE - this list will be expanded as more information about the scan 83 * is gathered and returned. 84 * 85 * @param prop Property list to fill in. 86 * 87 * @exception StandardException Standard exception policy. 88 **/ 89 Properties getAllScanInfo(Properties prop) 90 throws StandardException; 91 } 92