Mark,

> > I realized a different problem: the combination of order by and LIMIT
> does
> > not always list the last message. According to
> > http://dev.mysql.com/doc/refman/5.0/en/limit-optimization.html MySQL
> ends
> > sorting after - in this case - one recordset. There could exist newer
> > recordsets in the database. Since the penpal bonus score is
> exponentially
> > decreasing in time, it might be too low.
> 
> Are you sure this is a problem? The text says:
>   MySQL ends the sorting as soon as it has found the first row_count
>   rows OF THE SORTED RESULT.
> This sounds just how it was supposed to be. There is no point
> in sorting remaining records, as long as the correct result is
> returned.

I had this issue once. Sorting records by timestamps showed different
results with and without LIMIT. This was when I became aware of the mysql
man page above. When using LIMIT some recordsets were missing in the sorted
list which resulted in different data as the last recordset. If 'ends the
sorting' means that sorting is aborted after row_count rows are found, how
could it be sure that there does not exist another recordset which ranks
within the sorted list?

Greetings
Bernd







-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
AMaViS-user mailing list
[email protected] 
https://lists.sourceforge.net/lists/listinfo/amavis-user 
 AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 
 AMaViS-HowTos:http://www.amavis.org/howto/ 

Reply via email to