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 977933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:58:58+00:00 2026-05-16T03:58:58+00:00

I have a standard LAMP server, and currently there is a way to attach/upload

  • 0

I have a standard LAMP server, and currently there is a way to attach/upload PDF’s, or JPEG’s with an inventory record. I designed this system way back in 1999/2000, and it has of course grown fairly large in size. The table that holds the attachments is approaching 10GB, which has made working with the data somewhat slow (especially when I want to query everything, and sort by filesize to see where the large attachments are)

I would like to ‘move’ this attachment storing out of MySQL, and into the filesystem. I basically just want to somehow store the PATH of the filename, in place of the current BLOB field.

Does anyone or has anyone done anything similar to this, and if so, what approach did you take to get the attachments out of the db, and into the filesystem? Currently, the app is in PHP, so I’m thinking of writing a script to iterate through every record, and save the current BLOB data to the filesystem.

Any thoughts or ideas on how to best accomplish this?

Many thanks,

Bruce

  • 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-05-16T03:58:59+00:00Added an answer on May 16, 2026 at 3:58 am

    Currently, the app is in PHP, so I’m thinking of writing a script to iterate through every record, and save the current BLOB data to the filesystem.

    I think that’s pretty much it. Set PHP’s max_execution_time to a huge value, and run through every record, fwrite() ing out the contents – not much else to it (unless I’m getting your question wrong).

    After successful writing, write back the written file path into the new filepath field, and clear the BLOB field’s contents (possibly after performing a CRC32 comparison to make really, really sure the contents were written out correctly).

    If the file doesn’t get written right, don’t clear the BLOB field. That way, you can resume a crashed run without having to run through each record again.

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

Sidebar

Related Questions

Using a standard LAMP server with full control, I need to upload an image
I have a VPS with Liquidweb, which currently uses a standard LAMP stack. I
I have standard ASP.NET 4 application. Inside this application there are also few razor
I have a standard windows server that inherits from the ServiceBase class. On the
Ok, So I have standard sencha-touch panel, and because this application needs to be
I have a web application that have standard form authentication declared, like this: <login-config>
I have a Cent OS setup running a pretty standard LAMP stack and I
I have standard databindings setup for all my TextBoxes to an Object like this:
I have a symfony website running on the standard LAMP setup. I need to
Could someone explain this for me? I have standard relations in my MSSQL DB:

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.