** 나는 9 개의 콤보 박스와 9 개의 테이블 파라독스 * .db를 가지고 있습니다. ** 테이블은 콤보 박스에 적용됩니다. 그리고 이것은 35-38 초의 작업입니까 ?? 더 빨리 필요합니다. 도와주세요. 배열로 작업을 시도하고 있지만 이것은 시간이 많이 안좋은 생각입니다. 너무 그래서 where
조항이 효율적으로 작업 테이블에어떻게 데이터를 데이터베이스에서 빨리 읽을 수 있습니까?
*_connection.Open();
cmdComboboxTable1=new OleDbCommand("SELECT DISTINCT cell FROM Table1 ;",_connection);
OleDbDataAdapter adapComboboxTable1=new OleDbDataAdapter(cmdComboboxTable1);2500records
cmdComboboxTable2=new OleDbCommand("select DISTINCT cell from table2 where cell is not null;",_connection);79000Records
OleDbDataAdapter adapComboboxTable2=new OleDbDataAdapter(cmdComboboxTable2);
cmdComboboxTable3=new OleDbCommand("select distinct cell from table3 WHERE EUR_STK_CD IS NOT NULL;",_connection);80000records
OleDbDataAdapter adapComboboxTable4=new OleDbDataAdapter(cmdComboboxTable4);9records
cmdComboboxTable4=new OleDbCommand("select cell1,cell2 FROM Table4;",_connection);
OleDbDataAdapter adapComboboxTable4=new OleDbDataAdapter(cmdComboboxTable4);
cmdComboboxTable5=new OleDbCommand("select DISTINCT cell From Table5 ORDER BY cell;",_connection);100000records
OleDbDataAdapter adapComboboxTable5=new OleDbDataAdapter(cmdComboboxTable5);
cmdComboboxTable6=new OleDbCommand("select distinct cell From Table6 where MODL_NM IS NOT NULL;",_connection);60000records
OleDbDataAdapter adapComboboxTable6=new OleDbDataAdapter(cmdComboboxTable6);
cmdComboboxtable7=new OleDbCommand("select distinct cell From table7 where cell IS NOT NULL;",_connection);120 records
OleDbDataAdapter adapComboboxTable=new OleDbDataAdapter(cmdComboboxTable7);12records
cmdComboboxTable8=new OleDbCommand("select cell FROM Table8;",_connection);
OleDbDataAdapter adapComboboxTable8=new OleDbDataAdapter(cmdComboboxTable8);
cmdComboboxTable9=new OleDbCommand("select distinct Cell1,cell2 FROM Table9;",_connection);11records
OleDbDataAdapter adapComboboxTable9=new OleDbDataAdapter(cmdComboboxTable9);
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
//StartBackgroundworker();
bgComboboxTable9.RunWorkerAsync();
bgComboboxTable2.RunWorkerAsync();
bgComboboxTable3.RunWorkerAsync();
bgComboboxTable4.RunWorkerAsync();
bgComboboxTable5.RunWorkerAsync();
bgComboboxTable6.RunWorkerAsync();
bgComboboxTable7.RunWorkerAsync();
bgComboboxTable8.RunWorkerAsync();
//This is method in all backgrounder worker
drComboboxTable9 = cmdComboboxTable9.ExecuteReader();
ListStore Table1List;
string Table1String;
Table9List=new ListStore(typeof(string));
comboboxentry4.Model=Table1List;
while(drComboboxTable1.Read()){
Table9String=(string)drComboboxTable1["LONG_NM"];
Table9List.AppendValues(Table1String);
}
//method end
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
string elapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:00}",
ts.Hours, ts.Minutes, ts.Seconds,
ts.Milliseconds/10);
Console.WriteLine("RunTime " + elapsedTime);*
좋아요, 시도 할 것입니다. 답변 해 주셔서 감사합니다. –