How to Insert Data in ClickHouse
Last updated July 25, 2026 · By the SaturnSQL team
Use INSERT INTO ... VALUES for literal rows or INSERT INTO ... SELECT to copy query results. Every INSERT creates a new data part on disk, so batch many rows per statement (thousands or more) instead of inserting row by row.
INSERT INTO events (event_time, user_id, event_type, url)
VALUES (now(), 101, 'page_view', '/pricing'), (now(), 102, 'signup', '/register');Insert from a query
INSERT INTO events_archive
SELECT * FROM events WHERE event_time < '2026-01-01';Too many small inserts causes the 'too many parts' error. Batch on the client side, or enable async inserts so the server buffers them for you: SET async_insert = 1.
Run this in SaturnSQL
SaturnSQL is a browser-based SQL editor for teams: shared query library, schema-aware autocomplete, and scheduled exports to Google Sheets and Slack.
Try it free