1. 程式人生 > >如何快速建立千萬數量級資料

如何快速建立千萬數量級資料

  兩種造資料方法。

 一種是用之前測試時寫的造資料指令碼造資料。通過python指令碼

一種是在資料庫現有的基礎上造資料,資料庫儲存過程

下面python造數程式

random
path = list = (path,)
count1 = ()
i ():
    i = i+count1 +=randomcount = random.randint(,)
    (% (i,(randomcount),count1))
    list.writelines(% (i,(randomcount),count1))
    ()
list.close()

完成後利用資料庫匯入工具匯入到資料庫