Menu

#2 LIMIT results delimiter

open
None
5
2007-11-08
2007-11-06
No

Add 'LIMIT' to EuSQL. 'LIMIT' is used to limit the number of records returned. Examples:

select * from myrecords where amount > 100 LIMIT 10
select * from myrecords order by create_date LIMIT 10

means I want the first 10 records returned for each query result.

See http://php.about.com/od/mysqlcommands/g/Limit_sql.htm or Google it.

Will EuSQL LIMIT 10 faster than I could lop off the results myself? Looks like it would where the results were not ordered... That's probably some testing you'll have to do, Matt. :)

Discussion

  • Matt Lewis

    Matt Lewis - 2007-11-08

    Logged In: YES
    user_id=61059
    Originator: NO

    I've thought about doing this before. For non-ordered sets it could be implemented to dramatically increase the return of results if the difference between the limited set and the full set is large. It would probably slightly (probably not a measurable difference) increase the time for an ordered set.

     
  • Matt Lewis

    Matt Lewis - 2007-11-08
    • assigned_to: nobody --> mattlewis
     

Log in to post a comment.