脚本执行时间太长 [英] script execution time too long

查看:202
本文介绍了脚本执行时间太长的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一个脚本可以进行大量的数据库更新,这需要很长的时间。但是,我正在运行的主机(我怀疑大多数主机)是以安全模式运行的
。这意味着我无法更改脚本的最大执行时间。因此,脚本会在执行

更新时停止。


除此之外,我正在尝试制作可以分发给我的代码

其他人。截至目前,此脚本可以运行的唯一方法是使用sys

管理员干预。我想让它在没有任何帮助的情况下运行系统管理员。


有没有人能很好地解决这个问题呢?


-d



I have a script that does a huge database update, which takes a long
time. However, the host I am running on (and I suspect most hosts) are
running in "safe mode." This means I cannot change the maximum execution
time of scripts. So, the script stops right in the middle of doing the
update.

On top of that, I am trying to make code that I can distribute to
others. As of now, the only way that this script can be run is with sys
admin intervention. I would like to make it run without any help from
the system administrator.

Does any one have a good solution for this problem?

-d

推荐答案

我会重新设计数据库,使其更快,并使其成为无管理员
需要干预。


" Doug" <做***** @ XXXXremovetheXearthlink.net>在消息中写道

新闻:Aw ***************** @ newsread3.news.atl.earthl ink.net ...
i would redesign the database to make it faster and make it so that no admin
intervention would be needed.

"Doug" <do*****@XXXXremovetheXearthlink.net> wrote in message
news:Aw*****************@newsread3.news.atl.earthl ink.net...


我有一个脚本可以进行大量的数据库更新,这需要很长时间。
然而,我正在运行的主机(我怀疑大多数主机)正在运行<在安全模式中。这意味着我无法更改
脚本的最长执行时间。因此,脚本会在更新过程中停止运行。

最重要的是,我正在尝试制作可以分发给其他人的代码。
截至目前,这是唯一的这个脚本可以运行的方式是使用sys admin
干预。我想在没有
系统管理员帮助的情况下运行它。

有没有人能很好地解决这个问题呢?

-d


I have a script that does a huge database update, which takes a long time.
However, the host I am running on (and I suspect most hosts) are running
in "safe mode." This means I cannot change the maximum execution time of
scripts. So, the script stops right in the middle of doing the update.

On top of that, I am trying to make code that I can distribute to others.
As of now, the only way that this script can be run is with sys admin
intervention. I would like to make it run without any help from the
system administrator.

Does any one have a good solution for this problem?

-d





谢谢....这是一个选项,但是,有非常大量的数据

涉及。加上数据上的索引数量减慢了进入数据库的条目




-d


konsu写道:

Thanks.... That is an option, but, there is a very large amount of data
involved. Plus the amount of indexes on the data slow down the entry
into the DB.

-d

konsu wrote:
我会重新设计数据库,使其更快,并使其不需要管理员干预。

道格 <做***** @ XXXXremovetheXearthlink.net>在消息中写道
新闻:Aw ***************** @ newsread3.news.atl.earthl ink.net ...
i would redesign the database to make it faster and make it so that no admin
intervention would be needed.

"Doug" <do*****@XXXXremovetheXearthlink.net> wrote in message
news:Aw*****************@newsread3.news.atl.earthl ink.net...

我有一个脚本可以进行大量的数据库更新,这需要很长时间。
然而,我正在运行的主机(我怀疑大多数主机)正在运行
安全模式。这意味着我无法更改
脚本的最长执行时间。因此,脚本会在更新过程中停止运行。

最重要的是,我正在尝试制作可以分发给其他人的代码。
截至目前,这是唯一的这个脚本可以运行的方式是使用sys admin
干预。我想在没有
系统管理员帮助的情况下运行它。

有没有人能很好地解决这个问题呢?

-d

I have a script that does a huge database update, which takes a long time.
However, the host I am running on (and I suspect most hosts) are running
in "safe mode." This means I cannot change the maximum execution time of
scripts. So, the script stops right in the middle of doing the update.

On top of that, I am trying to make code that I can distribute to others.
As of now, the only way that this script can be run is with sys admin
intervention. I would like to make it run without any help from the
system administrator.

Does any one have a good solution for this problem?

-d




嗯,你说的是一个处理请求的网络服务器,带有一些html

表单数据因为数据库

操作需要太长时间而无法完成处理。它花费太长时间的原因并不是因为表格中有很多数据,否则它会更早地扼杀所有

数据,甚至可能更早客户端,所以它不是形式,它是b $ b是数据库的设计。你试过在空数据库上测试它吗?

它有效吗?如果确实如此,那么要看的是将

数据库分段。你必须对数据库做一些事情,因为

从你所说的看起来它是无法管理的,因此不再是实用的
。换句话说,这是无用的。 ;-)


konstantin

" Doug" <做***** @ XXXXremovetheXearthlink.net>在消息中写道

新闻:EE ***************** @ newsread3.news.atl.earthl ink.net ...
well, you are talking about a web server processing a request with some html
form data and not being able to finish the prcessing because the database
operation takes too long. the reason why it takes too long is not because
there is a lot of data in the form, otherwise it would choke with all that
data much earlier, maybe even on the client side, so it is not the form, it
is the design of the database. did you try to test it on an empty database?
does it work? if it does then one thing to look at is to segment the
database into pieces. you have to do something with the database because
from what you are saying it looks like it is unmanageable and hence is not
practical to use anymore. it is useless in other words. ;-)

konstantin
"Doug" <do*****@XXXXremovetheXearthlink.net> wrote in message
news:EE*****************@newsread3.news.atl.earthl ink.net...

谢谢....这是一个选项,但是,涉及的数据非常多。加上数据上的索引数量减缓了进入数据库的速度。

-d

konsu写道:

Thanks.... That is an option, but, there is a very large amount of data
involved. Plus the amount of indexes on the data slow down the entry into
the DB.

-d

konsu wrote:
i将重新设计数据库,使其更快,并使其不需要管理员干预。
i would redesign the database to make it faster and make it so that no
admin intervention would be needed.



这篇关于脚本执行时间太长的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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