douji6667 2014-04-05 09:05
浏览 3153
已采纳

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

  • 写回答

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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100