1

I have a table with 200k records and I want to have 1000 rows randomly to work on.

The primary key is something like this

000279a4-3214-4f9c-93c3-168634f4548a

I saw this question but PK is a number in there, so does not work for me

MySQL select 10 random rows from 600K rows fast

G. Hak.
  • 361
  • 2
  • 3
  • 11

1 Answers1

1

You could use order by rand() and limit 1000

select * 
from my_table  
order by rand()  
limit  1000 
ScaisEdge
  • 131,976
  • 10
  • 91
  • 107