Blog

Efficient MySQL Pagination

When I first started learning programming, I followed examples in textbooks using LIMIT offset, row_count for pagination. However, as the volume of data increased, this pagination method caused longer query times for later pages. In MySQL, when an offset is specified, it does not directly start retrieving data from that offset. Instead, it fetches all data based on the ‘where’ conditions first, and then retrieves the required number of rows beginning from the offset.

Posted on  May 29, 2016  in  MySQL  by  Amo Chen  ‐ 3 min read

Know Your VIM - Basic Cursor Movement

Up, Down, Left, and Right

Remembering how to move up, down, left, and right in VIM doesn’t require any secret tricks. The reason h, j, k, l are used for left, down, up, and right is because on the developer’s keyboard at the time, hjkl also represented those directions.

Left, Down, Up, Right h j k l

Historical Note: ADM-3A Keyboard

Last updated on  Sep 29, 2024  in  Vim  by  Amo Chen  ‐ 2 min read