Back

Slow speed with pagination also, why?

  • 1
  • Databases
  • Web
  • Cloud
kamal.panara
2 Mar, 2024, 15:52

hi there, quick question! I'm using pagination as per this docs: https://appwrite.io/docs/products/databases/pagination

now, and I'm loading only 5 docs per page, still it's taking too much time to load single page, even 1st page. why? i tried both offset & cursor based both takes time.

TL;DR
Developers are experiencing slow speed with pagination even when loading only 5 documents per page. A suggestion was made to add an ascending key index on the column 'name'. Additionally, clarifying questions were asked about the queries, the number of documents in the collection, and the location of the developer. They are using pagination according to Appwrite's documentation, but are still encountering delays.
Steven
2 Mar, 2024, 15:54
  1. What exactly are all your queries?
  2. How many documents do you have in your collection?
  3. Where are you located?
kamal.panara
2 Mar, 2024, 15:55
  1. Queries:
TypeScript
Query.orderAsc("name"),
Query.limit(table.rowsPerPage), // table.rowsPerPage == 5
Query.cursorAfter(tableData[tableData.length - 1].$id), // using last doc's id
  1. 32 Documents
  2. India
kamal.panara
2 Mar, 2024, 15:58

I'm on pro plan with appwrite cloud.

Steven
2 Mar, 2024, 15:59

And how long does this take?

Steven
2 Mar, 2024, 15:59

Can you try adding an ascending key index on name?

kamal.panara
2 Mar, 2024, 16:00

14-16 secs

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more