On 18 Nov 2006, at 19:35, Jeremy Dunck wrote: > This isn't a Django question, but indexes only work well when there's > a large distribution of values. If lots of your products are in that > price range, you're still ordering by loads of randoms. Try assigning > (as a column value) a random integer to each product, index that > column, and select product where random_value in (...10 randomly > generated numbers).
Yes, the price index does have significantly fewer values than the id index... lots of items are 9.99 for example... I am trying to return ALL records (paged of course) so can't do an WHERE random_number IN() because I want to ORDER BY that value, not select from... if you see what I mean thanks tom --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---