sql - Increase performance of SELECT * FROM # ORDER BY # ASC LIMIT # OFFSET #; -
basically, want effective , fast lazy loading sorted list on web page hsqldb. current sql query ineffective , slow:
select o human o order o.firstname asc limit 500k offset 50;
could increase performance of it?
domain object:
@roojpaactiverecord public class human { @notnull @column(name="firstname") string firstname; @notnull @column(name="lastname") string lastname; }
sql table:
id, firstname, lastname, version
add index on firstname
column , ready go (if gonna sort only/first firstname). of course depends on database. mysql see this page.
Comments
Post a Comment