Is there a limit to the "LIMIT" script in MySQL?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Is there a limit to the "LIMIT" script in MySQL?

Post by simonmlewis »

Code: Select all

SELECT * FROM `subscribed_upload` LIMIT 300000, 400000
We have a table with over 1.2M rows.
I need to import them all into another table on a completely separate database.
I think it will throw a fit if I try a full on import, so thought I would do it in stages.

But when I run this, it doesn't do anything . and if I run it as a CSV export, it exports nothing.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Is there a limit to the "LIMIT" script in MySQL?

Post by Celauran »

Can you not use something like mysqldump? Probably easier that way.
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Is there a limit to the "LIMIT" script in MySQL?

Post by simonmlewis »

never used that....?!
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Is there a limit to the "LIMIT" script in MySQL?

Post by Celauran »

If you've got shell access, it's probably the best approach. Manual.

If you don't have shell access, setting up remote access through something like HeidiSQL might also be worth exploring.
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Is there a limit to the "LIMIT" script in MySQL?

Post by simonmlewis »

OK ta. PS I'll reply to the other thread about the monitor..... bit of a joke!
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
Post Reply