> thx, take a random seed form the session and shuffle data is a good
> idea
> 
> looks like slow because of amount od data, but I can save the random
> numbers for each row in the database and make 2 selects, one > then
> random(seed) and join it with the other, <= random(seed)

The catch is if two users can see the same data, you'd have to 
store this sequence in a User+MyModel join-table so that one 
user's sequencing doesn't collide with another user's.

How much data are we talking about?  hundreds of records? 
thousands?  tens-of-thousands?  millions?  If it's less than a 
couple thousand (I'd use 3000-8000 as an arbitrary threshold I've 
felt out for similar manipulations...test against your own data), 
the overhead of writing back to the DB is pretty high and fraught 
with headaches so I'd opt for just shuffling on the fly with each 
request.

-tim



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to