题目增加时间也增加就正常,增加多少的原因就不好说。
快来围观,快来围观,神仙打架,神仙打架
USE sp n = GETWORDCOUNT(jmss1, ",") COPY TO tmp.txt FIELDS jmss1 SDF CREATE TABLE tt (f1 N(4,2)) FOR i=2 TO n ALTER TABLE tt ADD ("f"+TRANSFORM(i)) N(4,2) ENDFOR APPEND FROM tmp.txt TYPE DELIMITED WITH "," BROWSE
t1 = SECONDS() DIMENSION az[100] USE tt FOR i=1 TO FCOUNT() STORE 0 TO az COPY TO ARRAY arr FIELDS (FIELD(i)) FOR j=1 TO ALEN(arr) k = (arr[j]+1)*10 az[k] = az[k]+1 ENDFOR ENDFOR ? SECONDS() - t1 FOR i=1 TO 100 IF az[i] > 0 ? i/10-1, az[i] ENDIF ENDFOR
[此贴子已经被作者于2021-4-2 06:15编辑过]