I'm using the following snippet of code for testing. It takes ~30s to run.
The select returns ~32,000 rows. If I limit number of rows by using TOP 100
in the select the execution time remains the same.
Code: Select all
connection.Open();
int count = 0;
using (SalesforceCommand command = connection.CreateCommand())
{
	command.CommandText = "SELECT Company, Status, CreatedDate FROM Lead";
	sw.Start();
	using (SalesforceDataReader reader = command.ExecuteReader())
	{
		string value;
		while (reader.Read())
		{
			value = reader.GetString(0);
			++count;
		}
	}
	sw.Stop();
}takes just a few seconds.
I tried the CacheAll option, which looks promising, but then the first execution,
while the data is not in the cache yet, takes ~50s which is not acceptable.
I wonder if there is a way on improving the speed of the connector?