I am trying to flatten some columns of a table into a single column. My current approach is to enlist those columns into a single column and then use ungroup on table to flatten it. But this approach is very inefficient, takes more than 2 seconds on 1300000 rows and 3 columns in this example. My actual table has more rows and about 20 columns to flatten. Is there a way to optimize this or an alternative approach?
/ flatten v1,v2 and v3 columns into one column va:([]cust:n?`8; v1:n?100; v2:n?100; v3:n?100)\t ungroup ?[a;();0b;`cust`v!(`cust;(flip; plist,`v1`v2`v3))]2079