From a4672d6bed32e3be6c1da52e12469f8c507144d4 Mon Sep 17 00:00:00 2001 From: Gabor Szarnyas Date: Fri, 14 Jun 2024 11:51:22 +0200 Subject: [PATCH] Performance Guide: Prefer CTAS to ALTER TABLE --- docs/guides/performance/schema.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/guides/performance/schema.md b/docs/guides/performance/schema.md index e796ab1d5e8..e25fcc05711 100644 --- a/docs/guides/performance/schema.md +++ b/docs/guides/performance/schema.md @@ -84,3 +84,7 @@ We illustrate the effect of using primary keys with the [LDBC Comment table at s In this case, primary keys will only have a (small) positive effect on highly selective queries such as when filtering on a single identifier. They do not have an effect on join and aggregation operators. > Bestpractice For best bulk load performance, avoid defining primary key constraints if possible. + +## Schema Changes + +When making changes to the schema, prefer using [`CREATE TABLE ... AS SELECT`](../../sql/statements/create_table#create-table--as-select-ctas) to [`ALTER TABLE`](../../sql/statements/alter_table).