The fastest way to expand the size of a SciDB array


#1

Some asked: if there is a SciDB array of a given size, how to expand the dimension size?

A general but slow solution is redimension() into an array with a larger size.

For this particular purpose, a faster solution exists: store() into an array with a larger size, provided that the two arrays have the same chunk intervals. As an example, see the “screenshot” below:

$ iquery -a
AFL% create array A<v:int64>[i=1:4,2,0];
Query was executed successfully

AFL% store(build(A,i*10), A);
{i} v
{1} 10
{2} 20
{3} 30
{4} 40

AFL% create array B<v:int64>[i=1:10,2,0];
Query was executed successfully

AFL% store(A,B);
{i} v
{1} 10
{2} 20
{3} 30
{4} 40

AFL% show(B);
{i} schema
{0} ‘B<v:int64> [i=1:10,2,0]’