1 21 22 package org.apache.derby.impl.sql.execute.rts; 23 24 import org.apache.derby.iapi.services.i18n.MessageService; 25 import org.apache.derby.iapi.reference.SQLState; 26 27 33 public class RealDistinctScalarAggregateStatistics 34 extends RealScalarAggregateStatistics 35 { 36 37 38 public int rowsInput; 39 40 42 46 public RealDistinctScalarAggregateStatistics( 47 int numOpens, 48 int rowsSeen, 49 int rowsFiltered, 50 long constructorTime, 51 long openTime, 52 long nextTime, 53 long closeTime, 54 int resultSetNumber, 55 int rowsInput, 56 double optimizerEstimatedRowCount, 57 double optimizerEstimatedCost, 58 ResultSetStatistics childResultSetStatistics 59 ) 60 { 61 super( 62 numOpens, 63 rowsSeen, 64 rowsFiltered, 65 constructorTime, 66 openTime, 67 nextTime, 68 closeTime, 69 resultSetNumber, 70 false, rowsInput, 72 optimizerEstimatedRowCount, 73 optimizerEstimatedCost, 74 childResultSetStatistics 75 ); 76 } 77 78 80 87 public String getStatementExecutionPlanText(int depth) 88 { 89 initFormatInfo(depth); 90 91 return 92 indent + MessageService.getTextMessage(SQLState.RTS_DSARS) + 93 ":\n" + 94 indent + MessageService.getTextMessage(SQLState.RTS_NUM_OPENS) + 95 " = " + numOpens + "\n" + 96 indent + MessageService.getTextMessage(SQLState.RTS_ROWS_INPUT) + 97 " = " + rowsInput + "\n" + 98 dumpTimeStats(indent, subIndent) + "\n" + 99 dumpEstimatedCosts(subIndent) + "\n" + 100 indent + MessageService.getTextMessage(SQLState.RTS_SOURCE_RS) + 101 ":\n" + 102 childResultSetStatistics.getStatementExecutionPlanText(sourceDepth) + "\n"; 103 } 104 105 115 public String getScanStatisticsText(String tableName, int depth) 116 { 117 return childResultSetStatistics.getScanStatisticsText(tableName, depth); 118 } 119 120 121 122 124 public String toString() 125 { 126 return getStatementExecutionPlanText(0); 127 } 128 public java.util.Vector getChildren(){ 129 java.util.Vector children = new java.util.Vector (); 130 children.addElement(childResultSetStatistics); 131 return children; 132 } 133 137 public String getNodeName(){ 138 return MessageService.getTextMessage(SQLState.RTS_DISTINCT_SCALAR_AGG); 139 } 140 } 141 | Popular Tags |