sql - creating a random blob in jdbc and writing it to oracle -
i want create many blobs in java [in memory] , write oracle table.
what want blob[bits inside it] random or sudo random oracle not able lot of pre-optimization while storing blob table.
something
for(1..1000000) { blob = createrandomblob(sizeofblob); sqltext ="insert test_blob (id, blob) values(i, blob)"; stmt.executeupdate(sqltext); } can point java apis can use create such blob[in memory rather on disk] , write db ?
thanks
i think should trick
byte[] data = new byte[10000]; frandom.nextbytes(data); try { serialblob fserialblob = new serialblob(data); } catch (serialexception e) { // todo auto-generated catch block e.printstacktrace(); } catch (sqlexception e) { // todo auto-generated catch block e.printstacktrace(); } dont know if there faster/efficient way of doing it.
Comments
Post a Comment