I'm writing a pagination API to give random result by setting random seed value. unless the user wants to shuffle the result, the result will be same but if the user wants to shuffle I will recreate seed values so it will return a different set of record.
My problem here is if I delete a record from the DB, even if the seed is same the result is coming different because of the change in elements length. Is there any way to make it persistent even after the record is deleted?
Example query:
set seed to 0.1; select * from table order by random();