Should I distribute my inserts on different nodes?

Moderator: NorbertKrupa

Post Reply
hopewell
Beginner
Beginner
Posts: 29
Joined: Wed Mar 27, 2013 10:39 pm

Should I distribute my inserts on different nodes?

Post by hopewell » Thu Dec 04, 2014 9:24 pm

I have 4 nodes and 4 long running SQL insert as select statements that insert data into the same table. Each insert statement run for hours. Is it better to have 4 connections to one node where each session runs one of the insert statements, or one connection per node per insert statement?

NorbertKrupa
GURU
GURU
Posts: 527
Joined: Tue Oct 22, 2013 9:36 pm
Location: Chicago, IL
Contact:

Re: Should I distribute my inserts on different nodes?

Post by NorbertKrupa » Thu Dec 04, 2014 10:54 pm

What isolation level are you using? READ COMMITTED allows for concurrent INSERT statements.

Ideally, you should try to batch your loads.
Checkout vertica.tips for more Vertica resources.

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: Should I distribute my inserts on different nodes?

Post by id10t » Fri Dec 05, 2014 11:43 am

Hi!

[DELETED]
Last edited by id10t on Mon May 04, 2015 10:17 pm, edited 1 time in total.

NorbertKrupa
GURU
GURU
Posts: 527
Joined: Tue Oct 22, 2013 9:36 pm
Location: Chicago, IL
Contact:

Re: Should I distribute my inserts on different nodes?

Post by NorbertKrupa » Fri Dec 05, 2014 3:37 pm

id10t wrote:Please clarify what do you mean:
  • INSERT INTO <tbl> SELECT ... FROM
  • INSERT INTO <tbl> VALUES (...)
Great point.
Checkout vertica.tips for more Vertica resources.

hopewell
Beginner
Beginner
Posts: 29
Joined: Wed Mar 27, 2013 10:39 pm

Re: Should I distribute my inserts on different nodes?

Post by hopewell » Fri Dec 05, 2014 3:43 pm

Thanks for the responses, guys!

I am doing 4 "INSERT INTO <tbl> SELECT ... FROM" statements.

So, it's recommended that I do each insert on its own node? That makes sense.

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: Should I distribute my inserts on different nodes?

Post by id10t » Fri Dec 05, 2014 9:43 pm

Hi!

[DELETED]
Last edited by id10t on Mon May 04, 2015 10:15 pm, edited 1 time in total.

hopewell
Beginner
Beginner
Posts: 29
Joined: Wed Mar 27, 2013 10:39 pm

Re: Should I distribute my inserts on different nodes?

Post by hopewell » Fri Dec 05, 2014 10:19 pm

Thanks! I get it :) Makes complete sense, great explanation!

Post Reply

Return to “Vertica Database Development”