共享数据库桌面/网络应用程序 [英] Shared database desktop/web app

查看:142
本文介绍了共享数据库桌面/网络应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有2个应用程序:基于Web的(PHP)和桌面(VB)共享同一个数据库(Hostgator)。我们的网络应用程序可以快速访问数据库(它的localhost)。我们的桌面应用程序遇到访问缓慢和频繁超时。
什么是这种问题的最佳方法?我们应该共享数据库吗?有没有其他解决方案。
感谢

We have 2 applications: web-based (PHP) and Desktop (VB) sharing the same database (Hostgator). Our web app has a fast access to the database (it's localhost). Our desktop application suffers with slow access and frequent timeouts. What's the best approach to this kind of issue? Should we share a database? Are there any other solution. Thanks

推荐答案

问题可能不是它的共享;相反,它可能是数据正在经历的网络。在非常少的情况下,使用网络连接比localhost访问MySQL数据更快,所以你不能期望两者的性能相同。

The problem is probably not that it's shared; rather, it's probably the network that the data is going over. There are very few circumstances in which it's faster to use a network connection than localhost for accessing MySQL data, so you can't expect the same performance from both.

但是,您应该能够通过一个良好的网络获得一个相当快速和可靠的数据库连接。如果你正在移动大量的数据,你可能需要使用某种缓存。但如果即使在中等大小的查询也发生问题,您可能必须将此问题提交给您的托管公司进行故障排除。许多共享主机没有针对远程数据库托管进行优化(大多数网站不需要/使用/想要它),所以如果他们不能适应它,你可能需要移动到满足你的需求的主机。

However, you should be able to get a fairly fast and reliable db connection over a good network. If you're moving huge amounts of data, you may have to employ some sort of caching. But if the issues are happening even on moderately-sized queries, you may have to bring that issue to your hosting company for troubleshooting. Many shared hosts are not optimized for remote DB hosting (most sites don't need/use/want it), so if they can't accomodate it, you may have to move to a host that will meet your needs.

这篇关于共享数据库桌面/网络应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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