WHERE column_name IN (value 1, value 2, value 3, etc...);``` is missing from web.sdk, we have to make several requests, which takes a ton of time if we want to delete .e.g 10k items.
Making multiple requests is the way to go at the moment. to optimize this, you can:
- Have an appwrite function execute the API call so that there's less latency for the delete API calls
- Concurrently process batches rather than executing them serially
well that's exactly what I do already ```js if(!payload.remove || !Array.isArray(payload.remove)){ return res.json({"error": "no payload", "payload": payload}, 400) }
const { remove } = payload;
const batchSize = 10; const totalBatches = Math.ceil(remove.length / batchSize);
for (let i = 0; i < totalBatches; i++) { const start = i * batchSize; const end = start + batchSize; const batchIds = remove.slice(start, end);
const promises = batchIds.map((id) => {
return database.deleteDocument('default', 'rss_articles', id)
});
await Promise.all(promises);
}``` But it deletes one document at the time, imagine if there is a lot of entries, it will be a lot slower. Anyway, Are there any plans to look in to this ?
Feel free to create a feature request
Where exactly can I do that?
GitHub issues
Ok, thank you very much
[Solved] Where do we add request for mass delete?
[SOLVED] Where do we add request for mass delete?
Recommended threads
- Anyone manage to get a slack-bot working...
I'm trying to setup a bot the send and retrieve slack messages to a chat in my site. I've failed with SSE and appwrite functions soo far... i'll trying polling ...
- [Sites] Deployment finished but site is ...
The deployment finished and is active but the site shows timeout error.
- Does Appwrite allow SSE ?
i'm trying to setup a slack bot on my site. Your deployed SSE endpoint is returning a non‑SSE response …and the browser immediately closes the connection. read...