我有以下用C#编写的代码,但据此,将数据从Oracle数据库迁移到Elasticsearch需要4-5天.我是以100个批次插入记录.还有其他方式可以更快地移动400万条记录(如果可能的话,可能在不到一天的时间内)吗?
public static void Selection()
{
for(int i = 1; i < 4000000; i += 1000)
{
for(int j = i; j < (i+1000); j += 100)
{
OracleCommand cmd = new OracleCommand(BuildQuery(j),
oracle_connection);
OracleDataReader reader = cmd.ExecuteReader();
List<Record> list=CreateRecordList(reader);
insert(list);
}
}
}
private static List<Record> CreateRecordList(OracleDataReader reader)
{
List<Record> l = new List<Record>();
string[] str = new string[7];
try
{
while (reader.Read())
{
for (int i = 0; i < 7; i++)
{
str[i] = reader[i].ToString();
}
Record …Run Code Online (Sandbox Code Playgroud) 是否有任何关键字可以与 Robot Framework 中的“等待关键字成功”相同,或者我是否必须完全创建一个新关键字?我对该框架相当陌生,我希望实现以下目标:
Wait Until Keyword Succeeds 10x 20s
... ${response} = Some Keyword arg
... Should Match ${response} ${val}
Run Code Online (Sandbox Code Playgroud)
或者有另一种方法来解决这个问题吗?