gpt4 book ai didi

mysql - 错误: MySQL client ran out of memory

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

任何人都可以告诉我这个错误...

数据库有 40,000 条新闻报道,但只有“story”字段较大,'old' 是一个数值 0 或 1,'title' 和 'shortstory' 非常短或为 NULL。

任何建议表示赞赏。这是运行搜索数据库查询的结果。

Error: MySQL client ran out of memory 
Statement: SELECT news30_access.usehtml, old, title, story, shortstory, news30_access.name AS accessname, news30_users.user AS authorname, timestamp, news30_story.id AS newsid FROM news30_story LEFT JOIN news30_users ON news30_story.author = news30_users.uid LEFT JOIN news30_access ON news30_users.uid = news30_access.uid WHERE title LIKE ? OR story LIKE ? OR shortstory LIKE ? OR news30_users.user LIKE ? ORDER BY timestamp DESC

最佳答案

简单的答案是:不要在 SELECT 子句中使用 story

如果您想要故事,请限制返回的结果数量。从 100 个结果开始,添加:

limit 100

到查询的末尾。这将获取 100 个最新故事。

我还注意到您将 likestory 以及其他字符串列一起使用。您可能希望将 match 与全文索引一起使用。这并不能解决您眼前的问题(即向客户端返回太多数据)。但是,它会让您的查询运行得更快。

要了解全文搜索,请从 documentation 开始.

关于mysql - 错误: MySQL client ran out of memory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40961309/

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