Select dist symbol from bhav_data into cursor dist1 nofilter select date from bhav_data group by 1 order by 1 into cursor date_temp nofilter select Dist1 scan dimension aopen[1] arraycount = 0 select date_temp scan if seek(dtos(date)+dist1.symbol,'bhav_data','pk') arraycount= arraycount+1 dimension aopen[arraycount] aopen[arraycount] = bhav_data.open endif endscan * feed the array adate endscan That is fast , but not really fast as rebuilding idx in code but I feel with a marginial difference in time (about .5x difference) and well faster that using SQL abiout 3xThanx all for putting me use the CDX