Go Back   Forum Care Forums > Development Reference Area > MySQL Discussion

Reply
 
LinkBack Thread Tools Display Modes
c# queries slower than java?
Old
  (#1)
Guest
Guest
 
Posts: n/a
Default c# queries slower than java? - 06-04-2007, 07:48 AM

Hi,
I have been accessing mysql via java and am now trying to use c#
instead. I am using the .Net connector that I downloaded from
mySQl.org. However, it seems much slower in selects than the jobdc
driver. For example, a selection of 200,000 rows took me 8 seconds in
c# compared to 2 seconds in java. Is there some other approach I
should be using?

I am using the following code in c#:

using MySql.Data.MySqlClient;
string connStr = "server=***;user id=***; p***word=***; database=***;
pooling=false";
try
{

DataTable data = new DataTable();
MySqlConnection conn = new MySqlConnection(connStr);
conn.Open();
MySqlDataAdapter da = new
MySqlDataAdapter("SELECT * FROM table1 where x<200000", conn);
da.Fill(data);
}

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top