insertDataV4.sim 825 字节
Newer Older
P
plum-lihui 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41

sql connect

print ================ insert data
$dbNamme  = d1
$tbPrefix = ct
$tbNum    = 2
$rowNum   = 100
$tstart   = 1640966400000  # 2022-01-01 00:00:00.000

sql use $dbNamme

loop_insert:
$i = 0
while $i < $tbNum
  $tb = $tbPrefix . $i

  $x = 0
  while $x < $rowNum
    $c = $x / 10
    $c = $c * 10
    $c = $x - $c

    $binary = ' . binary
    $binary = $binary . $c
    $binary = $binary . '

    #print ====> insert into $tb values ($tstart , $c , $x , $binary )
    #print ====> insert into ntb values ($tstart , $c , $x , $binary )
    sql insert into $tb values ($tstart , $c , $x , $binary )
    sql insert into ntb values ($tstart , $c , $x , $binary )
    $tstart = $tstart + 1
    $x = $x + 1
  endw

  $i = $i + 1
  $tstart = 1640966400000
endw
goto loop_insert