简体   繁体   English

Wamp vs Production上的Mysql Innodb数据库

[英]Mysql innodb database on wamp vs production

i have 2 servers, one test one production. 我有2台服务器,一台测试一台产品。

  1. Test - WAMP on Win7 (Intel i7 4GB Ram) 测试-Win7上的WAMP(Intel i7 4GB Ram)
  2. Production - IIS + FastCGI + MYSQL on Windows Server 2008 (Intel Xeon 2.4GHZ 12GB Ram) 生产-Windows Server 2008上的IIS + FastCGI + MYSQL(Intel Xeon 2.4GHZ 12GB Ram)

We have an innodb database setup on both, and after deploying PHP source files, it would appear that a particular group of functions querying/displaying data from the database takes 100% LONGER on the production server. 我们在两者上都有一个innodb数据库设置,并且在部署PHP源文件之后,似乎特定的一组查询/显示数据库数据的功能在生产服务器上占用了100%的时间。

On my test environment, I am seeing results come back after ~3 secs. 在我的测试环境中,我看到约3秒后结果恢复。 On production, it takes ~10 secs for exactly the same query, with exactly the same source files and same mirror of dbase. 在生产中,完全相同的查询,完全相同的源文件和相同的dbase镜像大约需要10秒钟的时间。

If anything, I was expecting for timings to be reversed, ie production 100% faster than wamp. 如果有的话,我期望时间可以颠倒,即生产速度比沼泽地快100%。 I checked my.ini files on both sides, and although they are not the same obviously there is nothing glaringly wrong in there which would cause this. 我在两边都检查了my.ini文件,尽管它们显然不相同,但那里没有明显的错误会导致此问题。 I tested with a few different configs of my.ini on production and this had no effect in reducing the processing times. 我在生产中使用了my.ini的一些不同配置进行了测试,但这对减少处理时间没有影响。

The query used for this test is a complex multiple loop which interogates the database (sends one query, then loops through results and does further queries to mysql server on each row) All results are kept and modified in memory using multidimensional arrays. 用于该测试的查询是一个复杂的多重循环,该循环对数据库进行查询(发送一个查询,然后循环搜索结果,并在每行上对mysql服务器进行进一步查询)。所有结果都使用多维数组保存和修改在内存中。

I am timing the actual script execution only (mysql + php data retrieve and process), not the time it takes to send this data to the browser :) 我只是在计时实际的脚本执行时间(mysql + php数据检索和处理),而不是将这些数据发送到浏览器所花费的时间:)

Where should I look next? 我下一步应该去哪里?

just to close this, it was due to the incorrect localisation within php environment - setting my locale at the top of the php page cured the problem. 只是为了解决这个问题,这是由于php环境中的本地化不正确-将我的语言环境设置在php页面的顶部可以解决此问题。 (despite it being correctly set within php.ini, IIS slowed down when performing date based functions) love microsoft (尽管已在php.ini中正确设置,但在执行基于日期的功能时IIS速度变慢)喜欢Microsoft

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

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