So, the BigQuery Scripting feature came out and I thought of giving it a try.
I understand it is still in beta and being tested. However, to get a feel of it, I ran this small simple loop of 20k cycles a bunch of times, and each time it took between 5 and 10 minutes (and sometimes more) to complete. Sometimes, I just had to cancel the job because it was taking forever.
declare n int64;
declare i int64;
declare k float64;
set i = 0;
set n = 20000;
set k = rand();
loop
set i = i + 1;
if i >= n then leave;
else set k = k*rand();
end if;
end loop;
select k;
I am wondering if I am doing anything incorrect here, or it's just that it is not as performant yet.
NOTE: Here is one of the job ids: music-178807:US.bquxjob_366fc627_16da33c0ee1