在网络上连接到MySQL数据库后,Internet使用率变高 [英] Internet usage getting high after connecting to MySQL database on net

查看:72
本文介绍了在网络上连接到MySQL数据库后,Internet使用率变高的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Windows应用程序,它连接到db4Free上的mySQL数据库。每当我连接到该数据库时,我发现我的数据使用率非常高。我找到的数据使用量是每20分钟300 MB ..我甚至没有使用任何图像上传。我只是从mySQL数据库表中读取数据。并且每秒钟都经常读取数据。我只是使用简单的查询。



我根本不会责怪db4free网站,这是我的编码错误或知识匮乏。

请帮帮我。



我用MySQL-Connector标记了这个问题因为codeproject在选择MySQL标签时抛出错误。

解决方案

这不是你问题的直接解决方案,但可以帮助你找出发生的事情。



你可以用一个工具来分析你的计算机上的流量,看看发生了什么。

Sysinternals是一个很好的开始使用不同的Windows工具。

Sysinternals Networking Utilities [ ^ ]

寻找TCPView。它会显示你打开了哪些连接,但不包含显示器。

引用:



TCPView是一个Windows程序,它将向您显示系统上所有TCP和UDP端点的详细列表,包括本地和远程地址以及TCP连接状态。





对于网络监视器,您可以从Microsoft尝试此工具

微软网络监视器3.4 [ ^ ]



引用:

允许捕获和协议分析网络流量的工具。





如果它是一个具有源代码的应用程序,您始终可以添加写入已发送和已接收数据的日志记录功能如果你每5或10分钟创建一个新文件,你可以看到在这个时间范围内传输了多少数据。


数据到文件。

传输和查询意味着带宽的使用,并取决于每个查询请求的行数。



算一算: 300,000 Kb / 20 * 60秒= 250kb / sec 这是合理的。



尝试启用压缩。


I have one windows application which keep connecting to mySQL database which is on db4Free. I found that my data usage is really high whenever i connected to that database. Data usage I found is 300 MB per 20 Minutes.. I even not used any image upload. I am just reading data from that mySQL database table. and reading of data is frequent like per second. I am just using simple queries.

I am not at all blaming to db4free website for this, this is my coding fault or weak knowledge.
Please help me.

I have tagged this question with MySQL-Connector Because codeproject throwing error while selecting MySQL tag.

解决方案

This is not a direct solution to your problem, but might help you to find out what is happening.

You could use a tool to analyze the traffic on your computer in order to see what is going on.
Sysinternals is a good place to start for different windows tools.
Sysinternals Networking Utilities[^]
Look for TCPView. It will show you which connections you have open, but doesn't contain a monitor.

Quote:


TCPView is a Windows program that will show you detailed listings of all TCP and UDP endpoints on your system, including the local and remote addresses and state of TCP connections.



For a network monitor you can try this tool from Microsoft
Microsoft Network Monitor 3.4[^]


Quote:

Tool to allow capturing and protocol analysis of network traffic.



If it is an application you have the source code for, you can always add a logging functionality that writes sent and received data to a file.
If you create a new file every 5 or 10 minutes, you can see how much data that is transferred within this time frame.


Data transfer and "querying" imply the use of bandwidth and depend on how many rows are being requested per query.

Doing the math : 300,000 Kb / 20*60 seconds = 250kb/sec which is reasonable.

Try enabling compression.


这篇关于在网络上连接到MySQL数据库后,Internet使用率变高的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆