简体   繁体   English

SQLyog如何与MySQL通信?

[英]How does SQLyog communicate with MySQL?

I'm using Visual Studio 2010 and the MySQL.Net connector. 我正在使用Visual Studio 2010和MySQL.Net连接器。 I have a query that on VS takes about 20 seconds to complete. 我有一个查询,在VS上大约需要20秒才能完成。 On SQLyog, the exact same query takes less than a second. 在SQLyog上,完全相同的查询不到一秒钟。 I did a Wireshark trace of the two queries. 我对这两个查询做了Wireshark跟踪。 The VS query uses plain text to and from the server. VS查询使用往返于服务器的纯文本。 SQLyog uses some strange format and is unreadable. SQLyog使用一些奇怪的格式,并且不可读。 Whats more, the SQLyog query does it all in 3 packets: a request, response and final ACK. 而且,SQLyog查询以3个数据包完成所有操作:请求,响应和最终ACK。 The VS does it in 10 packets: request, two responses, ACK, two more responses, ACK, two more responses and final ACK. VS以10个数据包的形式进行处理:请求,两个响应,ACK,另外两个响应,ACK,另外两个响应和最终ACK。 And the result is that two rows are returned in both cases. 结果是在两种情况下都返回两行。 Does anyone know why SQLyog is so much faster and what interface they use? 有谁知道为什么SQLyog这么快以及他们使用什么接口?

Terry 特里

SQLyog uses mysql's c api : SQLyog使用mysql的c api

Written entirely in C/C++/Win32 APIs using native MySQL C APIs. 使用本机MySQL C API完全以C / C ++ / Win32 API编写。 No wrapper classes used. 没有使用包装器类。

Whereas mysql.net connector : mysql.net连接器

Connector/Net is a fully managed ADO.NET driver written in 100% pure C#. Connector / Net是使用100%纯C#编写的完全托管的ADO.NET驱动程序。 It does not use the MySQL C client library. 它不使用MySQL C客户端库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM