From f442b231655d6373e08147a7a713ac2428b6ec5b Mon Sep 17 00:00:00 2001 From: josh-wong Date: Wed, 10 Sep 2025 02:46:27 +0000 Subject: [PATCH] AUTO: Sync ScalarDB docs in English to docs site repo --- docs/scalardb-sql/grammar.mdx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/scalardb-sql/grammar.mdx b/docs/scalardb-sql/grammar.mdx index 191a7317..b38f533e 100644 --- a/docs/scalardb-sql/grammar.mdx +++ b/docs/scalardb-sql/grammar.mdx @@ -552,6 +552,16 @@ DropCoordinatorTablesStatement statement2 = The `ALTER TABLE` command alters a table (ex. adding a column). +:::warning + +You should carefully consider adding a new column to a table because the execution time may vary greatly depending on the underlying storage. Please plan accordingly and consider the following, especially if the database runs in production: + +- **For Cosmos DB for NoSQL and DynamoDB:** Adding a column is almost instantaneous as the table schema is not modified. Only the table metadata stored in a separate table is updated. +- **For Cassandra:** Adding a column will only update the schema metadata and will not modify the existing schema records. The cluster topology is the main factor for the execution time. Changes to the schema metadata are shared to each cluster node via a gossip protocol. Because of this, the larger the cluster, the longer it will take for all nodes to be updated. +- **For relational databases (MySQL, Oracle, etc.):** Adding a column shouldn't take a long time to execute. + +::: + #### Grammar ```sql