Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not really:

  SELECT *
   FROM sales
  WHERE (sale_date, sale_id) < (?, ?)
  ORDER BY sale_date DESC, sale_id DESC
  FETCH FIRST 10 ROWS ONLY
This is a postgresql example. See use-the-index-luke[0] for a generic approach.

[0] http://use-the-index-luke.com/sql/partial-results/fetch-next...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: