Skip to main content

Questions tagged [pagination]

Separating results into equally-sized 'pages' typically for display purposes. Also known as 'paging'.

0 votes
0 answers
38 views

I have a high-traffic SQL Server stored procedure that runs thousands of times per hour. The procedure loads a filtered set of “projects” for a user, identifies the “active task” for each project, ...
lifeisajourney's user avatar
2 votes
1 answer
110 views

I have a table with over 10 million rows tracking user activities. I created a nonclustered index on (UserID, DtModified DESC), which performs well for queries filtering a single user. However, when ...
lifeisajourney's user avatar
0 votes
0 answers
52 views

I've a table, with fields like id batchId senderId recipientId uuid1 uuid uuid5 uuid7 uuid2 uuid uuid5 uuid8 uuid3 uuid2 uuid6 uuid9 I need to select rows with pagination, but handling rows with same ...
Sendoff74's user avatar
1 vote
0 answers
49 views

I'm going in circles brainstorming ideas and TypeScript or SQL code to implement basically a "rhyming database". The goal of the rhyming database is to find rhymes for all words, not just ...
Lance Pollard's user avatar
2 votes
1 answer
522 views

A while back I asked this question about efficiently selecting unique permutations of columns in Postgres. Now I have a follow-up question regarding how to do so, with the addition of being able to ...
hunter's user avatar
  • 217
3 votes
1 answer
1k views

I'm working on implementing pagination for a PostgreSQL database in which I have a table that stores users for my application. I have a query that is intended to fetch the next page of users based on ...
odyssey's user avatar
  • 33
1 vote
1 answer
702 views

I have a MySQL database for example, ID Title Purchase_At 1 Title A 2023-12-01 2 Title B 2023-08-22 3 Title C 2023-12-01 4 Title D 2023-08-23 5 Title E 2023-12-01 6 Title F 2023-06-22 7 Title G 2023-...
Gummi's user avatar
  • 13
0 votes
1 answer
194 views

I have a public API method that calls a Postgres (14) database and returns a paginated list of rows belonging to a user along with a total count and page index. The count is very costly to perform (...
JackMahoney's user avatar
2 votes
1 answer
6k views

I need to improve the performance of a paged query for customer orders in a Type2 Postgres db (always insert a new record with a new ID, the newest ID is the current version of the record). Changing ...
jcollum's user avatar
  • 229
0 votes
1 answer
963 views

Consider this pagination scenario id name last_name 1 Mickey Mouse 2 Donald Duck 3 Scrooge McDuck 4 Minerva Mouse 5 Goofus Dawg 6 Daisy Duck SELECT * FROM users ORDER BY id DESC LIMIT 3; The result ...
Sergey Zolotarev's user avatar
2 votes
1 answer
272 views

I have the following query SELECT u.update_time, about_me FROM users u ORDER BY date_bin('14 days', u.update_time, '2023-04-07 23:11:56.471560Z') DESC, LENGTH(u.about_me) DESC, u.user_id; I get the ...
DanMossa's user avatar
  • 145
0 votes
1 answer
673 views

I have a table billing_billcycleorders that contains a foreign key billing_cycle_id. There are around 0.9m records for a particular billing_cycle_id. I want to select the data in the chunks for ~5000 (...
sirajalam049's user avatar
1 vote
1 answer
905 views

Say I am trying to build a pagination for a simple e-commerce app where user can search, filter, and sort items, and the result is displayed in an infinite scroll UI. I'm planning to use the cursor ...
hskris's user avatar
  • 111
5 votes
1 answer
2k views

I am using the keyset pagination method for uuids on my Postgres database described in this post: How to do Pagination with UUID v4 and Created Time on Concurrent Inserted Data? However, I have ...
Daniel's user avatar
  • 51
15 votes
1 answer
848 views

I have a table such as the following: create table [Thing] ( [Id] int constraint [PK_Thing_Id] primary key, [Status] nvarchar(20), [Timestamp] datetime2, [Foo] nvarchar(100) ) with a ...
Twicetimes's user avatar

15 30 50 per page
1
2 3 4 5