Details
-
Bug
-
Status: Resolved
-
Low
-
Resolution: Duplicate
-
None
-
None
-
Ubuntu OS
-
Low
Description
Hello,
I am trying copy command in Cassandra to import CSV file in to DB, Import is taking huge time, any suggestion to improve it?
id,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z
100,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26
101,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26
–
–
there are ~ 50 K lines in this file , size is ~ 5 MB.
I have created table as per below:
create table csldata4 ( id int PRIMARY KEY,a int , b int, c int, d int, e int, f int,
g int, h int,i int, j int, k int, l int,m int, n int, o int, p int, q int, r int, s int, t int, u int, v int, w int, x int, y int , z int);
Copy Command:
COPY csldata4 (id , a , b , c , d , e , f , g , h , i , j , k , l , m , n , o , p , q , r , s , t , u , v , w , x , y , z ) FROM 'csldata1.csv' WITH HEADER=TRUE;
Issue here is it's taking huge time to import
cqlsh:mykeyspace> COPY csldata (id , a , b , c , d , e , f , g , h , i , j , k , l , m , n , o , p , q , r , s , t , u , v , w , x , y , z ) FROM 'csldata1.csv' WITH HEADER=TRUE;
66215 rows imported in 1 minute and 31.044 seconds.
Attachments
Issue Links
- duplicates
-
CASSANDRA-7405 Optimize cqlsh COPY TO and COPY FROM
- Resolved