public function getEstimatedBlobArchiveRowSize($row_count, $blob_size, $name_size, $status)
    {
        // calculate the size of each fixed size column in a blob archive table
        static $fixedSizeColumnLength = null;
        if (is_null($fixedSizeColumnLength)) {
            $fixedSizeColumnLength = 0;
            foreach ($this->dataAccess->getColumnsFromTable($status['Name']) as $column) {
                $columnType = $column['Type'];

                if (($paren = strpos($columnType, '(')) !== false) {
                    $columnType = substr($columnType, 0, $paren);
                }

                $fixedSizeColumnLength += $this->getSizeOfDatabaseType($columnType);
            }
        }
        // calculate the average row size
        if ($status['Rows'] == 0) {
            $avgRowSize = 0;
        } else {
            $avgRowSize = $status['Index_length'] / $status['Rows'] + $fixedSizeColumnLength;
        }

        // calculate the row set's size
        return $avgRowSize * $row_count + $blob_size + $name_size;
    }
public function getEstimatedBlobArchiveRowSize($row_count, $blob_size, $name_size, $status)
    {
        // calculate the size of each fixed size column in a blob archive table
        static $fixedSizeColumnLength = null;
        if (is_null($fixedSizeColumnLength)) {
            $fixedSizeColumnLength = 0;
            foreach ($this->dataAccess->getColumnsFromTable($status['Name']) as $column) {
                $columnType = $column['Type'];

                if (($paren = strpos($columnType, '(')) !== false) {
                    $columnType = substr($columnType, 0, $paren);
                }

                $fixedSizeColumnLength += $this->getSizeOfDatabaseType($columnType);
            }
        }
        // calculate the average row size
        if ($status['Rows'] == 0) {
            $avgRowSize = 0;
        } else {
            $avgRowSize = $status['Index_length'] / $status['Rows'] + $fixedSizeColumnLength;
        }

        // calculate the row set's size
        return $avgRowSize * $row_count + $blob_size + $name_size;
    }
public function getEstimatedBlobArchiveRowSize ( $ row_count , $ blob_size , $ name_size , $ status ) { // calculate the size of each fixed size column in a blob archive table static $ fixedSizeColumnLength = null ; if ( is_null ( $ fixedSizeColumnLength ) ) { $ fixedSizeColumnLength = 0 ; foreach ( $ this -> dataAccess -> getColumnsFromTable ( $ status [ 'Name' ] ) as $ column ) { $ columnType = $ column [ 'Type' ] ; if ( ( $ paren = strpos ( $ columnType , '(' ) ) !== false ) { $ columnType = substr ( $ columnType , 0 , $ paren ) ; } $ fixedSizeColumnLength += $ this -> getSizeOfDatabaseType ( $ columnType ) ; } } // calculate the average row size if ( $ status [ 'Rows' ] == 0 ) { $ avgRowSize = 0 ; } else { $ avgRowSize = $ status [ 'Index_length' ] / $ status [ 'Rows' ] + $ fixedSizeColumnLength ; } // calculate the row set's size return $ avgRowSize * $ row_count + $ blob_size + $ name_size ; }
Gets the estimated database size a count of rows in a blob_archive table. Depends on
the data table row to contain the size of all blobs & name strings in the row set it
represents.
Gets the estimated database size a count of rows in a blob_archive table . Depends on the data table row to contain the size of all blobs & name strings in the row set it represents .