To test performance with many and large binary objects, I need 1.000 or more document attachments to be available within Exact Online.
Loading them through the user interface is quite cumbersome: many clicks per document and there is no easy drag & drop. Email might be an option, but still with 1.000 documents it is a hassle.
How can I fast load a large volume of document attachments into Exact Online?
The easiest way was to use the website lorempixel.com. On every unique hit it provides a new nice picture with configurable dimensions (throughput is approximately 1000 KB of document attachments created per second).
set use-http-cache false
use 868056 /* Set division. */
insert into exactonlinerest..documents
( subject
, type
)
select 'Sample document #' || value
, 101
from range(1000)@datadictionary /* Load 1,000 documents. */
insert into exactonlinerest..DocumentAttachmentFiles
( attachment
, document
, filename
)
/* And each document gets an additional attachment per time this insert is run. Run it 10 times to load 10 document attachments per document. */
select httpget('http://lorempixel.com/400/400/?val=' || value) attachment
, dct.id
, value || '.jpg'
from range(1000, 1)@datadictionary
join exactonlinerest..documents dct
on dct.type = 101
and dct.subject like 'Sample document #%'
and dct.subject = 'Sample document #' || value