I faced a problem with very slow INSERT
s in Vertica DB
.
I made such test: create empty table with no projections and start inserting in it in batch, using
> INSERT INTO table
SELECT 111,222,333 UNION ALL
SELECT 444,555,666 UNION ALL
SELECT 777,888,999;
1000 rows in one query.
On idle server one query runs about 2sec and it's alright, but then I start generating some load making SELECT
s (not very big load though, about 10 LA on 32 core server) and INSERT
s start to performs 20x slower ( 40-60 sec each 1000 rows INSERT
). It's too slow for my conditions. What can I do besides copying files to Vertica server and make COPY which seems to perform good, but too complicated?
Best Answer
You shouldn't be surprised that a load takes longer when there's more resource usage. However, there's probably a simple explanation for your poor performance. I would examine the following:
INSERT
withUNION ALL
s is highly suspicious. Is the load more than 100MB? If yes, useCOPY
.Your "1000 rows" isn't helpful because your row can be 10MB wide, or you could be loading
JSON
, loadingLONG VARCHAR
, etc. An actual load size is more valuable. On a typical DL380 Gen2, you should see around 350GB/HR/node.