Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8786559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:39:45+00:00 2026-06-13T21:39:45+00:00

What is the most efficient way to delete orphan blobs from a Blobstore? App

  • 0

What is the most efficient way to delete orphan blobs from a Blobstore?

App functionality & scope:

  • A (logged-in) user wants to create a post containing some normal
    datastore fields (e.g. name, surname, comments) and blobs (images).
  • In addition, the blobs are uploaded asynchronously before the resto
    of the data is sent via a POST

    • This leaves a good chance of having orphans as, for example, a user may upload images but not complete the form for one reason or another. This issue would be minimized by not using an asynchronous upload of the blobs before sending the rest of the data, however, this issue would still be there on a smaller scale.

Possible, yet inefficient solutions:

  • Whenever a post is completed (i.e. the rest of the data is sent), you add the blob keys to a table of “used blobs”. Then, you can run a cron every so often and compare all of the blobs with the table of “used blobs”. Those that have been uploaded over an hour ago yet are still “not used” are deleted.
    • My understanding is that running through a list of potentially hundreds of thousands of blob keys and comparing it with another table of hundreds of thousands of “used blob keys” is very inefficient.

Is there any better way of doing this? I’ve searched for similar posts yet I couldn’t find any mentioning efficient solutions.

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T21:39:47+00:00Added an answer on June 13, 2026 at 9:39 pm

    Thank for the comments. However, I understood those solutions well, I find them too inefficient. Querying thousands of entries for those that are flagged as “unused” is not ideal.

    I believe I have come up with a better way and would like to hear your thoughts on it:

    When a blob is saved, immediately a deferred task is created to delete the same blob in an hour’s time. If the post is created and saved, the deferred task is deleted, thus the blob will not be deleted in an hour’s time.

    I believe this saves you from having to query thousands of entries every single hour.

    What are your thoughts on this solution?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What would you say is the most efficient way to delete old records from
What is the most efficient way to delete an existing object from a Rails
Is this the most efficient way to delete from DeletedProducts table where there are
What is the easiest and most efficient way to delete a specific page from
I would like to know the most efficient way to delete an entire binary
What would be the most efficient way to SELECT this, then DELETE it immediately.
What is the most efficient way to delete an arbitrary chunk of a file,
Possible Duplicate: Most efficient way in SQL Server to get date from date+time? I
What's the most efficient way to convert the output of this function from a
What is the most efficient way to get Elastic Map Reduce output into SimpleDB?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.