SQL

LIMIT Clause

English

Overview

A clause that limits the number of result rows returned.

Details

A clause that caps the number of rows in a result set, used for things like implementing pagination. With OFFSET-based pagination, the database has to skip an ever-growing number of rows as the page number increases, making deep pages slow to load on large datasets -- keyset pagination, which filters on the last-seen ID instead, is the usual fix.

More Database terms