You don’t seem interested in the actual count so give this a try:
SELECT 1 FROM table WHERE fk = 1 LIMIT 5000, 1
If a row is returned, you have 5000 and more records. I presume the fk
column is indexed.
You don’t seem interested in the actual count so give this a try:
SELECT 1 FROM table WHERE fk = 1 LIMIT 5000, 1
If a row is returned, you have 5000 and more records. I presume the fk
column is indexed.