C 存資料遍歷比較100萬條

2021-09-25 03:57:11 字數 1198 閱讀 8659

list的遍歷效率時間

/// /// list的效能

///

public void listshiy()

foreach (student item in list)

性別:");

}sw.stop();

console.writeline(sw.elapsedmilliseconds + "毫秒");

arraylist的遍歷效率時間

/// /// arraylist的效能

///

public void arraylistshiy()

foreach (student item in arraylist)

性別:");

}sw.stop();

console.writeline(sw.elapsedmilliseconds + "毫秒");

陣列的遍歷效率時間

/// /// 陣列的效能

///

public void shuzushiy()

foreach (student item in hashtable.values)

性別:");

}sw.stop();

console.writeline(sw.elapsedmilliseconds+"毫秒");

}

dictionary的效能效率時間 

/// ///dictionar的效能

///

public void dictionaryshiy()

foreach (student item in keys.values)

性別:");

}sw.stop();

console.writeline(sw.elapsedmilliseconds + "毫秒");

批量插入100萬條資料

建立資料庫 create database create database bulktestdb gouse bulktestdb go create table create table bulktesttable id int primary key,username nvarchar 32 p...

Oracle查詢前100萬條資料

oracle不支援select top語句,在oracle中經常是用order by跟rownum select 列名1 列名n from select 列名1 列名n from 表名 order by 列名1 where rownum n 抽出記錄數 order by rownum asc 如 按...

PHP爬蟲 100萬條資料其實不難

php爬取100萬條資料,首先要思考這三個問題 怎麼爬取?怎麼提公升爬取速度?怎麼存放爬取的資料?第乙個想到是不是分布式爬蟲呢,主機多的話是可以這麼張狂任性的,單機的話就要內斂些了。不能分布式,那可以多執行緒啊,換個方向也是很有逼格的。php多執行緒,我首選 swoole 了,不僅可以 多執行緒,還...