Package org.apache.derby.iapi.sql.dictionary

Examples of org.apache.derby.iapi.sql.dictionary.StatisticsDescriptor


        long[] c = cCount.getCardinality();
        DataDescriptorGenerator ddg = dd.getDataDescriptorGenerator();

        for (int i= 0; i < c.length; i++)
        {
          StatisticsDescriptor statDesc =
            new StatisticsDescriptor(dd, dd.getUUIDFactory().createUUID(),
                          cd.getUUID(), td.getUUID(),
                          "I", new
                            StatisticsImpl(numRows,
                                     c[i]),
                          i + 1);
View Full Code Here


    if ((numRows = cCount.getRowCount()) > 0)
    {
      long[] c = cCount.getCardinality();
      for (int i = 0; i < c.length; i++)
      {
        StatisticsDescriptor statDesc =
          new StatisticsDescriptor(dd, dd.getUUIDFactory().createUUID(),
                        cgd.getUUID(), td.getUUID(), "I", new StatisticsImpl(numRows, c[i]),
                        i + 1);
        dd.addDescriptor(statDesc, null,
                 DataDictionary.SYSSTATISTICS_CATALOG_NUM,
                 true, tc);
View Full Code Here

    boolean validStat = false;
    ExecRow row = getExecutionFactory().getValueRow(SYSSTATISTICS_COLUMN_COUNT);
   
    if (td != null)
    {
      StatisticsDescriptor statDesc = (StatisticsDescriptor)td;
      myID = statDesc.getUUID().toString();
      tableID = statDesc.getTableUUID().toString();
      referenceID = statDesc.getReferenceID().toString();
      updateTime = statDesc.getUpdateTimestamp();
      statType = statDesc.getStatType();
        validStat = statDesc.isValid();
      statisticsObject = statDesc.getStatistic();
      columnCount = statDesc.getColumnCount();
    }

    row.setColumn(1, new SQLChar(myID));
    row.setColumn(2, new SQLChar(referenceID));
    row.setColumn(3, new SQLChar(tableID));
View Full Code Here

    /* 8th column is statistics itself */
    col = row.getColumn(SYSSTATISTICS_STAT);
    Statistics stat = (Statistics)col.getObject();

    return new StatisticsDescriptor(dd, statUUID, statReferenceUUID,
                       statTableUUID, // statName, colMap,
                       statType, stat, columnCount);
  }     
View Full Code Here

        if (numRows == 0) {
            trace(2, "empty table, no stats written");
        } else {
            // Construct and add the statistics entries.
            for (int i=0; i < cardinality.length; i++) {
                StatisticsDescriptor statDesc = new StatisticsDescriptor(
                        dd, uf.createUUID(), index, table, "I",
                     new StatisticsImpl(numRows, cardinality[i]),
                     i+1);
                dd.addDescriptor(statDesc, null,
                        DataDictionary.SYSSTATISTICS_CATALOG_NUM, true, tc);
View Full Code Here

      if ((numRows = ((CardinalityCounter)cCount).getRowCount()) > 0)
      {
        long[] c = ((CardinalityCounter)cCount).getCardinality();
        for (int i = 0; i < c.length; i++)
        {
          StatisticsDescriptor statDesc =
            new StatisticsDescriptor(
                            dd,
                            dd.getUUIDFactory().createUUID(),
                            cd.getUUID(),
                            td.getUUID(),
                            "I",
View Full Code Here

      if ((numRows = ((CardinalityCounter)cCount).getRowCount()) > 0)
      {
        long[] c = ((CardinalityCounter)cCount).getCardinality();
        for (int i = 0; i < c.length; i++)
        {
          StatisticsDescriptor statDesc =
            new StatisticsDescriptor(
                            dd,
                            dd.getUUIDFactory().createUUID(),
                            cd.getUUID(),
                            td.getUUID(),
                            "I",
View Full Code Here

         * to sys.sysstatstics
         */
        break;     
      }

      StatisticsDescriptor statDesc;

      dd.dropStatisticsDescriptors(tableId, objectUUID[indexNumber],
                     tc);

      for (int i = 0; i < indexRow[indexNumber].nColumns() - 1; i++)
      {
        statDesc = new StatisticsDescriptor(dd, dd.getUUIDFactory().createUUID(),
            objectUUID[indexNumber],
            tableId,
            "I",
            new StatisticsImpl(numRows,
                cardinality[i]),
View Full Code Here

      if ((numRows = ((CardinalityCounter)cCount).getRowCount()) > 0)
      {
        long[] c = ((CardinalityCounter)cCount).getCardinality();
        for (int i = 0; i < c.length; i++)
        {
          StatisticsDescriptor statDesc =
            new StatisticsDescriptor(
                            dd,
                            dd.getUUIDFactory().createUUID(),
                            cd.getUUID(),
                            td.getUUID(),
                            "I",
View Full Code Here

    /* 8th column is statistics itself */
    col = row.getColumn(SYSSTATISTICS_STAT);
    Statistics stat = (Statistics)col.getObject();

    return new StatisticsDescriptor(dd, statUUID, statReferenceUUID,
                       statTableUUID, // statName, colMap,
                       statType, stat, columnCount);
  }     
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.sql.dictionary.StatisticsDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.