common problem when working with large amounts of data is how to fetch the data and display it in a reasonable amount of time.
The solution to this problem is pagination. Pagination can be done on the front-end, back-end, or both.
Pagination, also known as paging, is the process of dividing a document into discrete pages, … Server-side pagination is appropriate for large data sets providing faster initial page load.
-Wikipedia
_Server-side pagination is more common. Client-side pagination can be used when there are very few records to be accessed, in which case all records can be returned, and the client can use JavaScript _ or _CSS
In this article we will write a PostgreSQL function, that can be invoked from a back-end API, after the front-end calls the API with what _page _it wants and _number of records i_t wants per page.
Flow of Records
#pagination #postgresql #backend #postgres #database