Skip to content
Advertisement

MySQL showing that select * from has internal limit 0,1000 . how to stop it

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

Advertisement

Answer

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.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement