Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Jdbc batch inserts are very slow

Jdbc batch inserts are very slow

New Contributor

Hello.

I'am trying to insert 200,000 records into hive text table using jdbc driver and sql insert statements.

I use Statement.addBatch method and executeBatch per  9000 rows.

Now it takes 60 seconds for every 9000 rows insertion. I've tried to use 15 000 or 20 000 batch size - but i can't get a response from hive using this batch size - it hangs.

Is this batch functionality supported by the driver or  i have to use something else?

Thanks

 

1 REPLY 1
Highlighted

Re: Jdbc batch inserts are very slow

New Contributor

Hi Lenoid,

When i looked at Driver Doc, it says executeBatch() is not supported, may i know how are you trying to execute batch inserts?