hi.
I'm having some trouble getting my pavasive sql to work fast.
beyond that, i have a running project where my db server uses all the CPU,
and I have found that it must be of the same reason.
I have made an wary simple code to check the speed, up against a mssql database.
I'm using ADO.NET 3.0.
Code:
using (PsqlConnection connection = CreateConnection())
{
using (PsqlCommand command = CreateCommand())
{
command.Connection.Open();
DateTime now = DateTime.Now;
for (int i = 0; i < 10000; i++)
{
command.ExecuteReader().Close();
}
sb.AppendLine("pervasive : " + (now - DateTime.Now).ToString());
command.Connection.Close();
}
}
using (SqlConnection connection = CreateConnection1())
{
using (SqlCommand command = CreateCommand1())
{
command.Connection.Open();
DateTime now = DateTime.Now;
for (int i = 0; i < 10000; i++)
{
command.ExecuteReader().Close();
}
sb.AppendLine("mssql : " + (now - DateTime.Now).ToString());
command.Connection.Close();
}
}
the sql statement id this : "SELECT * FROM PICTURE WHERE PICTUREID = 1234"
Test result:
the outcome og this test is:
parvasive : 00:01:06
mssql : 00:00:01
And now I'm thinking what is wrong here, I hope som one can help me.