Skip to content
Back

How do I manage the appwrite collection database having more than 5000 documents

  • 0
  • Self Hosted
  • Databases
  • Tools
  • Cloud
Suiii
19 Nov, 2024, 15:53

How do I manage the appwrite collection database having more than 5000 documents

TL;DR
Developers are having trouble managing the appwrite collection database with over 5000 documents. The pagination limit is 5000 and filtering/searching beyond that doesnโ€™t work as expected. It's limited to the last 5000 docs due to a performance issue in pagination implementation. No GitHub issue identified.
D5
19 Nov, 2024, 15:54

What do you mean by manage?

D5
19 Nov, 2024, 15:55

@Suii ๐Ÿš€

Suiii
19 Nov, 2024, 15:56

I can only retreive 5000 docs on the console. the rest is not retrevied

Suiii
19 Nov, 2024, 15:56

my colletion contain like 30K docs

Kenny
19 Nov, 2024, 15:56

Do you need all 30k at one time?

D5
19 Nov, 2024, 15:56

You can get more with filter and pagination, althought it shows 5k in the console count

Suiii
20 Nov, 2024, 01:40

expecting paged result.

Suiii
20 Nov, 2024, 01:40

i try with filter - no result

Suiii
20 Nov, 2024, 01:42

it should be more pages to go to.

Kenny
20 Nov, 2024, 01:49

Huh yea that seems like a bug imo

Suiii
20 Nov, 2024, 02:03

seem appwrite limits to last 5000 docs only

Suiii
5 Jan, 2025, 11:25

+1

D5
5 Jan, 2025, 12:03

Is there a GitHub issue for this?

Kenny
5 Jan, 2025, 14:49

Nah I asked about this itโ€™s a performance limitation and their implementation of pagination. To give the page numbers like they do they have to use offset pagination, and since the total is limited to 5000 they donโ€™t know whatโ€™s beyond or something like that

Suiii
6 Jan, 2025, 01:17

console might be not useful for collection containing more than 5000 documents as of now

Kenny
6 Jan, 2025, 02:43

You can filter down to what you need or search for it, the only limitation is pagination over 5000 afaik

Suiii
6 Jan, 2025, 03:44

that's expected behavoir, but what I see is. it is not fetched. let say I have 30K , I only fetch the first 5K for filteration/pagination.

Suiii
6 Jan, 2025, 03:45

as here, i expect it should be more paginated, 96 x 53 =5088 only. what else , it should be more pagined number

Kenny
6 Jan, 2025, 03:52

Sure, the limit is because they are using offset pagination to calculate those pages and the Appwrite endpoint for collections returns at most 5000 for the total. But the filtering and searching should not be effected by that, the only issue you have is if you want to go through every single page for a collection over 5000 records?

Kenny
6 Jan, 2025, 03:53

That shouldnโ€™t be how filtering works, it doesnโ€™t fetch the first 5000 it fetches them as you go to the page, itโ€™s showing 5000+ and stopping the pagination there because that is the max number returned in the total when doing list documents

Suiii
6 Jan, 2025, 06:00

the problem i am facing is , let say I have 30K doucments, it returns the first 5K documents. then, I try to filter to get some againts those 30K doucments, but it returns NOTHING. even there are in the database itselft, I already verified in the mariadb

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