java - VerticaCopyStream is very slow -


i use vertica flex table load json vertica without defining tables, , got problems loading time.

i connect vertica jdbc drive , use code..

string copyquery = "copy schema.tablename stdin parser fjsonparser()"; verticacopystream vstream = new verticacopystream((verticaconnection)conn, copyquery); inputstream input; vstream.start(); for(jsonnode json : jsonlist){      input = new bytearrayinputstream(json.tostring().getbytes());      vstream.addstream(input);      input.close(); } vstream.execute(); vstream.finish(); 

the command "vstream.execute()" takes 12 seconds 5000 jsons when use copy command file runs less second.

your problem not verticacopystream , problem regard different parsers used , need compare apple apple , json parser should more slower simple csv parser .


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -