I have been trying to evaluate BrightStar DB for my project initially what I did is -
Using brightstar DB (server sw) I stored my SQL Server database table into its default store i.e. file location (C:\Program Files\BrightstarDB\Data
) and then to measure performance gain compared to SQL Server database, I tried to query a table both in memory and SQL Server and tried to load into a gridview.
To my surprise I could see the time taken to load the data directly from SQL Server is half that of in memory db. I don't know if this is right way to check performance - if anyone has experienced working with in memory please guide.
Below is the code used to load direct from SQL Server and for in memory I followed this link http://brightstardb.com/documentation/Developing_With_BrightstarDB2.html.
protected void BtnDatabase_Click(object sender, EventArgs e)
{
try
{
GridView2.DataSource = null;
TDNdc = TextBox1.Text;
if (!string.IsNullOrEmpty(TDNdc))
selectCommand = "select * from dbo.TD_List where ID='" + TDNdc + "'";
String connectionString = @"data source=TD-abc\SQLEXPRESS;initial catalog=ScriptSave;integrated security=True";
DateTime varDateTime = DateTime.Now;
dataAdapter = new SqlDataAdapter(selectCommand, connectionString);
// Create a command builder to generate SQL update, insert, and
// delete commands based on selectCommand.
SqlCommandBuilder commandBuilder = new SqlCommandBuilder(dataAdapter);
// Populate a new data table and bind it to the BindingSource.
DataTable table = new DataTable();
// table.Locale = System.Globalization.CultureInfo.InvariantCulture;
dataAdapter.Fill(table);
TimeSpan result = DateTime.Now - varDateTime;
GridView2.DataSource = table;
GridView2.DataBind();
Response.Write("Time Taken to load " + GridView2.Rows.Count + " Record(s) From DB : " + result);
//LblInMem.Text = GridView2.Rows.Count + " Record(s) From DB : " + result;
//Response.Write("Time Taken to load datafrom DataBase " + result.ToString() + "Total Record :" + GridView2.Rows.Count);
}
catch (SqlException)
{
}
}