Skip to content

Instantly share code, notes, and snippets.

View zhjwpku's full-sized avatar
🦀

Junwang Zhao zhjwpku

🦀
View GitHub Profile
@zhjwpku
zhjwpku / citus_cheatsheet.sql
Last active November 9, 2023 04:33 — forked from sfriquet/citus_cheatsheet.sql
Citus Cheatsheet
-- Set number of shard
ALTER DATABASE citus SET citus.shard_count = 64;
-- distribute the table
SELECT create_distributed_table('github_events', 'repo_id');
-- undo that and make it local again
SELECT undistribute_table('github_events');
-- change distribution column