Skip to content

batch insert #107

Closed
Closed

Description

@fengyuncrawl

When I batch insert 10 million data into stand-alone clickhouse, The time spent avg 16min,why so slowly? @alexey-milovidov

Activity

  1. alexey-milovidov commented on Sep 6, 2016

    @alexey-milovidov
    Member

    How exactly (in what format, to what kind of table) do you insert your data?

    By the way, when using Values format, there is slow path, when data contains expressions (example: now() for DateTime field) or requires type conversion (example: '123' in quotes for integer field). So, you should specify data in explicit form.

  2. fengyuncrawl commented on Sep 6, 2016

    @fengyuncrawl
    Author

    create table(id Int64,name String,open_time Date)MergeTree('open_time', ('id','name'))
    when I use python client insert list to DB (for example: db.insert([p1,p2,p3...]))

  3. alexey-milovidov commented on Sep 6, 2016

    @alexey-milovidov
    Member

    Maybe it is an issue of Python client. Python clients are unofficial, we have not evaluated them.
    By the way, there are few different Python clients.

    Is problem persists, when you insert data with clickhouse-client from command line, as in tutorial?

  4. fengyuncrawl commented on Sep 6, 2016

    @fengyuncrawl
    Author

    I think so, the Python client lib is https://github.com/Infinidat/infi.clickhouse_orm ,so when I change to use clickhouse-client ,its so quickly! Thank for your answer.

  5. alexey-milovidov commented on Sep 7, 2016

    @alexey-milovidov
    Member

    Ok. I suggest you to create an issue in infi.clickhouse_orm repository.

  6. ishirav commented on Sep 29, 2016

    @ishirav

    Hi, infi.clickhouse_orm v0.7.1 includes several performance improvements that reduce the time it takes to insert large amounts of data. @fengyuncrawl - I would appreciate it if you could try it and report back whether it's working faster than before.

  7. added a commit that references this issue on May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions