batch insert performance

14 views
Skip to first unread message

Aaron Glasenapp

unread,
Jan 14, 2016, 1:01:04 PM1/14/16
to DataStax Ruby Driver for Apache Cassandra User Mailing List
I'm using the ruby-driver gem, trying to do batch inserts with prepared statements.
I have what amounts to a post request that should write 4000 records to Cassandra (1000 each to 4 different tables).

I am doing an unlogged_batch of 50 records each. I'm wondering if there is a more efficient way to do batch statements.

We're seeing 23% of the time spent in unlogged_batch and 21% of the time in execute_async. Underneath both of those is Cassandra::Protocol::Coder#write_value_v1. It appears to be converting data types twice.

Our target is < 1 second and these two methods amount to 40% of 1.8 seconds.

Sandeep Tamhankar

unread,
Jan 14, 2016, 2:10:38 PM1/14/16
to ruby-dri...@lists.datastax.com
Aaron,

I just filed https://datastax-oss.atlassian.net/projects/RUBY/issues/RUBY-153 to track this. Let's continue this discussion in that ticket going forward.

Before we go on, can you record the following in the ticket:
* Version of the ruby-driver you are using.
* Version of Cassandra you're using.
* An example script showing the problem.

What makes you think write_value_v1 is converting data types twice?

Thanks.
-Sandeep


-Sandeep
Ruby Driver Dude

--
You received this message because you are subscribed to the Google Groups "DataStax Ruby Driver for Apache Cassandra User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-driver-us...@lists.datastax.com.

Reply all
Reply to author
Forward
0 new messages