我在DELPHI下面的数据入库程序连结远程数据库进行录入的时候
12M的数据大概3万条记录需要4小时才能完成
但是连本机只要15分钟就搞定,我也试过批量更新
但一执行到那个地方就卡住了啊服务器是UNIX
装的ORA9I
这个速度正常吗?
如果我直接用FTP一个文件只需要2分钟,带宽应该没有什么问题的啊

解决方案 »

  1.   

    edtbaodan.Clear;
        edtbaodan.Lines.LoadFromFile(LocalFile);
        i := 0;
        if (i < edtbaodan.lines.Count) and (copy(edtbaodan.lines[i],
          length(edtbaodan.lines[i]) - 9, 10) = 'baodanhead') then
        begin
          table1.close;
          table1.open;
        end;
        while (i < edtbaodan.lines.Count) and (copy(edtbaodan.lines[i],
          length(edtbaodan.lines[i]) - 9, 10) = 'baodanhead') do
        begin
          try
            j := 0;
            table1.insert;
            str := edtbaodan.Lines[i];
            while (j < table1.fieldcount - 1) do
            begin
              postion := pos(',', str);
              if j = table1.fieldcount - 2 then
              begin
                if postion <> 1 then
                  table1.fields[j].value := copy(str, 1, postion - 1)
                else
                  table1.fields[j].value := null;
              end
              else if postion <> 1 then
                table1.fields[j].value := copy(str, 1, postion - 1)
              else
                table1.fields[j].value := null;
              str := copy(str, postion + 1, (length(str) - postion));
              j := j + 1;
            end; //end while        table1.post;
            i := i + 1;
            StatusBarmsg.Panels[0].text := '正在处理:报单成绩';
            StatusBarmsg.Panels[1].text := '已处理' + inttostr(i) + '条记录,总共有'
              + inttostr(edtbaodan.lines.Count) + '条记录';
            Formsjzr.Refresh;
          except
            begin
              // memo1.Lines.Add(edtbaodan.Lines[i]);
              table1.Cancel;
              i := i + 1;
              continue;
            end;
          end; //end except
        end; //end while  i<edtbaodan.lines.Count
      

  2.   

    ORA9I没有用过!SQL语言不能用嘛?我是菜鸟!