gpt4 book ai didi

mysql - 第 462 行的 fatal error : Maximum execution time of 60 seconds exceeded in\doctrine\lib\Doctrine\Collection. php

转载 作者:行者123 更新时间:2023-11-29 04:31:13 24 4
gpt4 key购买 nike

这是什么??我的查询是:

    Doctrine_Query::create()
->select('rec.*')
->from('Records rec')
->execute();

记录表包含超过 20k 行。

在页面上执行查询时出现错误:

     Fatal error: Maximum execution time of 60 seconds exceeded in \doctrine\lib\Doctrine\Collection.php on line 462

编辑但是要从记录超过 20k 的表中检索值需要 60 多秒.. 为什么?我正在使用同一张表通过 where 子句检索其他一些记录,它运行完美..

表结构:

 CREATE TABLE IF NOT EXISTS `records` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`state` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`city` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`school` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=16334 ;

数据库是本地的。

我们可以做一件事,我们可以选择一个元素。比如:城市...我试过了,即使它给出了同样的错误..

如表结构中所述,行数为 16333(准确),列数为 4..

谁能告诉我怎么解决???意味着为什么它不工作.. mysql 简单选择查询工作完美..

编辑----

谁能解释为什么他/她对我的问题投了“否定”票

最佳答案

Doctrine_Query::create()
->select('rec.*')
->from('Records rec')
->limit(5000)
->execute();

试试这个..它会工作正常但增加限制然后你会遇到问题.检索这么多记录会导致问题..尝试改变你正在使用的逻辑.索引等可能会解决你的问题但我没有任何关于那个的想法..也许这里有人可以帮助你。

关于mysql - 第 462 行的 fatal error : Maximum execution time of 60 seconds exceeded in\doctrine\lib\Doctrine\Collection. php,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2148604/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com