mysql - Pagination with lot of records avoid limit offset -


for example, has big mysql table (10kk records).
table struct:

create table `contents` (   `id` int(10) unsigned not null auto_increment,   /* fields hidden */   `update_time` int(10) unsigned not null default '0', /* index */   primary key (`id`) ) engine=innodb default charset=utf8; 

update_time may changed current unix timestamp time.
select query:

select ... contents ... order update_time desc [limit ...]; 

how make pagination, avoid limit offset? limit offset not useful query, because it's reading unneeded rows. example, select ... contents limit 9000000, 100 read ~9000100 rows.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -