1 21 22 package org.apache.derby.impl.sql.execute.rts; 23 24 import org.apache.derby.iapi.services.io.StoredFormatIds; 25 26 import org.apache.derby.iapi.services.i18n.MessageService; 27 import org.apache.derby.iapi.reference.SQLState; 28 29 import org.apache.derby.iapi.services.io.FormatableHashtable; 30 31 import java.io.ObjectOutput ; 32 import java.io.ObjectInput ; 33 import java.io.IOException ; 34 35 41 public class RealRowResultSetStatistics 42 extends RealNoPutResultSetStatistics 43 { 44 45 46 public int rowsReturned; 47 48 53 public RealRowResultSetStatistics( 54 int numOpens, 55 int rowsSeen, 56 int rowsFiltered, 57 long constructorTime, 58 long openTime, 59 long nextTime, 60 long closeTime, 61 int resultSetNumber, 62 int rowsReturned, 63 double optimizerEstimatedRowCount, 64 double optimizerEstimatedCost 65 ) 66 { 67 super( 68 numOpens, 69 rowsSeen, 70 rowsFiltered, 71 constructorTime, 72 openTime, 73 nextTime, 74 closeTime, 75 resultSetNumber, 76 optimizerEstimatedRowCount, 77 optimizerEstimatedCost 78 ); 79 this.rowsReturned = rowsReturned; 80 } 81 82 84 91 public String getStatementExecutionPlanText(int depth) 92 { 93 initFormatInfo(depth); 94 95 return 96 indent + MessageService.getTextMessage(SQLState.RTS_ROW_RS) + 97 ":\n" + 98 indent + MessageService.getTextMessage(SQLState.RTS_NUM_OPENS) + 99 " = " + numOpens + "\n" + 100 indent + MessageService.getTextMessage( 101 SQLState.RTS_ROWS_RETURNED) + 102 " = " + rowsReturned + "\n" + 103 dumpTimeStats(indent, subIndent) + "\n" + 104 dumpEstimatedCosts(subIndent) + "\n"; 105 } 106 107 117 public String getScanStatisticsText(String tableName, int depth) 118 { 119 return ""; 120 } 121 122 123 124 126 public String toString() 127 { 128 return getStatementExecutionPlanText(0); 129 } 130 134 public String getNodeName(){ 135 return MessageService.getTextMessage(SQLState.RTS_ROW_RS); 136 } 137 } 138 | Popular Tags |