2014-04-05 09:05
浏览 1.7k

MySQL显示select * from有内部限制0,1000。 如何阻止它

i am accesing my Mysql database server using Mysql workbench.and i have encountered a prolem. there is a table, named tags, in my database.which will have have more than thousands of tags in future.the problem is when i am executing select * from tags; query Mysql workbench is executing this (or taking action) like select * from tags LIMIT 0, 1000. i am giving you a snapshot enter image description here

my question is how can i stop it.because when i will launch my application it will have thousands(much more than 1000) of tags.if it implies LIMIT 0, 1000 internally then my php script wont have all the tags at the time of executing my tagging system.

all i want is to have no limits on select *.how can i do that?what will be the modified Select * query not to have any limits

图片转代码服务由CSDN问答提供 功能建议

我正在使用 Mysql workbench 访问我的 Mysql数据库服务器 我已经遇到了一个问题。在我的数据库中有一个名为 tags 的表。将来会有超过数千个标签。问题是当我执行时 select * from tags; query Mysql workbench 正在执行此(或采取行动),如 select * from tags LIMIT 0,1000 。 我给你一个快照

my 问题是如何阻止它。因为当我将启动我的应用程序时,它将有数千个(远超过1000个)标签。如果它暗示 LIMIT 0,1000 ,那么我的php脚本将不会全部 执行我的标记系统时的标记。

我想要的是选择* 我这样做了?修改后的 Select * 查询将没有任何限制

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

3条回答 默认 最新

  • duan39779 2014-04-05 09:22

    The limit you are seeing is simply an optimisation in the workbench to attempt to limit the number of rows returned from a large table.

    When you are running a query from either the console or via code, there are no limits placed on the number or rows returned.

    On that note though, it is normally good practise to either manually limit the number of rows returned or at least process the results a single row at a time. The reason is that if you try to get all the records at once you will have to assign that resultset as much memory as the entire set will use. If you process it one row at a time, you can re-use the same memory as you go.

    解决 无用
    打赏 举报
  • dongshubang7816 2017-07-05 11:57

    Go to -> MySQL Workbench -> Edit Menu -> preferences -> SQL Editor -> Query Results -> Uncheck Limit Rows.

    解决 1 无用
    打赏 举报
  • dongxin5054 2014-04-07 08:53

    I addition to Fluffeh's answer: you can change the limit to whatever value you want, including switching it off entirely (see the MySQL Workbench preferences).

    解决 无用
    打赏 举报

相关推荐 更多相似问题