So, I know that there is no such thing as \"last row\" on relational databases but I couldn\'t find a better word to explain what I want to do. I have a table that looks lik
Just put an index on the time stamp field. Mysql will take care of it for you.
What I want to do is a select that starts searching from the highest time field and since I know it is sorted from lowest to highest I want it to stop searching when ...
I really don't think you can tell MySQL to stop querying after a certain condition is met.
As a matter of fact, I really don't think you should care either. Querying is the database job and it does it pretty well. If it's a matter of performance, you should not see any difference until many centuries :)
What you're asking for is an index. I suggest you do some research into how b-tree indexes work.
If you had an index on the time field, the engine would essentially do what you're asking for - as the index would be ordered, it would "know" that it only needs to find the earliest point you're asking for and return everything after it.
http://dev.mysql.com/doc/refman/5.0/en/mysql-indexes.html