Synchronous mutation and classic update/delete statement support
See original GitHub issueMutation executes asynchronously in ClickHouse. And unlike other databases following SQL standard, it uses DDL instead of DML. As a result, this may break assumption in certain tools and generate overhead in downstream applications.
In order to follow standards, I hope we can:
- introduce a new connection setting
mutationsSync
(same as mutations_sync in ClickHouse) defaults to 1, meaning synchronous mutation - <no longer needed as it’s going to be implemented on server-side>
take classic update/delete and transform them intoALTER TABLE...
for mutation in ClickHouse So if you giveUPDATE tbl SET col1=1, col2=2 WHERE col3=3
, it will be translated intoALTER TABLE tbl UPDATE col1=1, col2=2 WHERE col3=3
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
Insert, update, and delete data using mutations | Cloud Spanner
A mutation represents a sequence of inserts, updates, and deletes that Spanner applies atomically to different rows and tables in a Spanner database....
Read more >Updates and Deletes in ClickHouse - Altinity
ClickHouse team wanted to express the difference from traditional SQL: new updates and deletes are batch operations, performed asynchronously.
Read more >Settings | ClickHouse Docs
User-level setting that allows mutations on replicated tables to make use of non-deterministic functions such as dictGet . Given that, for example, dictionaries ......
Read more >Is it possible to delete old records from clickhouse table?
2. Instead of delete where 1=1 which adds a mutation, I've been using TRUNCATE TABLE <table> which synchronously removes all data from table ......
Read more >HCatalog Streaming Mutation API
But while Hive itself supports INSERT , UPDATE and DELETE commands, and the ORC format can support large batches of mutations in a ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
2 is a bad idea. Mutations were made this way (with special syntax) intentionally - current ALTER UPDATE / DELETE are very expensive operations, which should be used with care, not too often.
Drivers should NOT introduce any magic to pretend that clickhouse has updates or deletes (hopefully they will be added in 2021).
Before light-weight mutation in place, since multi-statement SQL is now supported, we can run SQL like below in one run - session will be enabled automatically if the SQL contains multiple statements: