Is there a way to get random rows using Supabase ....
# javascript
j
Is there a way to get random rows using Supabase .js? Like, select 100 rows from a table but randomized/shuffled?
g
Not really unless you brute force 100 random id's in an .in filter. An rpc function returning multiple rows with a select * from table order by random() limit 100; But you should google "postgres random()" as evidently there are performance issues with larger tables.
j
Thank you!