mirror of
https://github.com/carrotquest/django-clickhouse.git
synced 2024-11-15 05:46:41 +03:00
Optimization
This commit is contained in:
parent
056aa0c5f1
commit
780b13a42e
|
@ -183,7 +183,8 @@ class ClickHouseModel(with_metaclass(ClickHouseModelMeta, InfiModel)):
|
|||
:return:
|
||||
"""
|
||||
if batch:
|
||||
cls.get_database(for_write=True).insert(batch, batch_size=len(batch))
|
||||
# +10 constant is to avoid 0 insert, generated by infi
|
||||
cls.get_database(for_write=True).insert(batch, batch_size=len(batch) + 10)
|
||||
|
||||
@classmethod
|
||||
def sync_batch_from_storage(cls):
|
||||
|
|
Loading…
Reference in New Issue
Block a user