Postgres::clusterIndex PHP Method

clusterIndex() public method

Clusters an index
public clusterIndex ( $table = '', $index = '' )
$table The table the index is on
$index The name of the index
    function clusterIndex($table = '', $index = '')
    {
        $sql = 'CLUSTER';
        // We don't bother with a transaction here, as there's no point rolling
        // back an expensive cluster if a cheap analyze fails for whatever reason
        if (!empty($table)) {
            $f_schema = $this->_schema;
            $this->fieldClean($f_schema);
            $this->fieldClean($table);
            $sql .= " \"{$f_schema}\".\"{$table}\"";
            if (!empty($index)) {
                $this->fieldClean($index);
                $sql .= " USING \"{$index}\"";
            }
        }
        return $this->execute($sql);
    }
Postgres