# MV\_REBALANCE\_STATUS

This view contains information about the status of `REBALANCE` commands such as [REBALANCE ALL DATABASES](https://docs.singlestore.com/db/v9.1/reference/sql-reference/cluster-management-commands/rebalance-all-databases.md) and [REBALANCE PARTITIONS](https://docs.singlestore.com/db/v9.1/reference/sql-reference/cluster-management-commands/rebalance-partitions.md).

| Column Name                   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `DATABASE_NAME`               | The name of the database the`REBALANCE`command is running on or within.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `ACTION`                      | The action being performed: either`COPY PARTITION`or`PROMOTE PARTITION`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `ORDINAL`                     | The`ID`of the related partition.The*Ordinal*is the target partition’s ordinal, and the*Target\_Host*and*Target\_Port*correspond to the destination leaf. Any two operations in the same*Phase*can be run in parallel and phases are run in order. For example, the aggregator can run`COPY PARTITION`on partitions`test:1`and`test:3`in parallel. The exact meaning of what each phase means is arbitrary and depends on the particular rebalance operation. The`Estimated_Time_Remaining_Ms`is the estimated total time (in milliseconds) that each low-level command will take to complete.                                                                                                                                                                       |
| `TARGET_HOST`                 | The target hostname or IP address of a`REBALANCE`command.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `TARGET_PORT`                 | The target port number of a`REBALANCE`command.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `PHASE`                       | The phase (group of actions occurring at the same time) that a given action is part of.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `STATUS`                      | The status of the`REBALANCE`. A`REBALANCE`consists of multiple commands that are run in phases. Can be one of:<ul> <li>cancelled - the command was cancelled (can happen if a rebalance is terminated)</li> <li>failed - the command failed to complete </li> <li>running - the command is currently in process</li> <li>scheduled - the command is scheduled to run</li> <li>success - the command ran successfully</li> </ul>Querying rebalance status during an ongoing rebalance will show some combination of success, running, and scheduled rows where the phases that completed already will show 'success', the phase that is currently ongoing will show that they are 'running', and the phases that must come next will show that they are 'scheduled'. |
| `RUNNING_TIME_MS`             | The amount of time in milliseconds spent on a given action.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `ESTIMATED_TIME_REMAINING_MS` | The estimated amount of time in milliseconds remaining for a given action.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |

***

Modified at: November 16, 2022

Source: [/db/v9.1/reference/information-schema-reference/segment-column-and-merge-status/mv-rebalance-status/](https://docs.singlestore.com/db/v9.1/reference/information-schema-reference/segment-column-and-merge-status/mv-rebalance-status/)

(An index of the documentation is available at /llms.txt)
