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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:46:47+00:00 2026-06-12T02:46:47+00:00

I am trying to store at least 500,000+ small files in a database (3

  • 0

I am trying to store at least 500,000+ small “files” in a database (3 KB average size up to about 8~10 MB occasionally). This is to remove them from the file-system and to speed up searches/user-operations.

  • Meta Data (essentially filename, datetime-created, datetime-modified)
  • A LONGBLOB of the file-contents

Storing them in the database (MySQL) has been fine. The database stores that number of files and searching the meta data (string, datetime, datetime) is also quick with the relevant indexes.

Unfortunately but unsurprisingly any attempt to search within the LONGBLOBs is really slow. Within the LONGBLOBs here is how the data looks:

  • 80% are “text files” (e.g. XML) and under 100 KB
  • 15% are “text files” but are over 100 KB (up to 8~10 MB)
  • 5% or less are binary files (which might get corrupted in a “text” container).

Would classifying this data as either text or unknown and then placing it in a separate LONGTEXT table provide performance improvements when doing operations like LIKE “%X%” (as opposed to LONGBLOB)?

Is there any other techniques I can do to improve performance when searching through BLOBs (in a very “grep” style)? The searches are typically short sequences of data held within the BLOB and there is likely few searches which get repeated (but searches are somewhat predictable, some data is more interesting than others).

  • 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-12T02:46:49+00:00Added an answer on June 12, 2026 at 2:46 am

    Well, you better do a full-text index (which will be of a HUGE size on such amounts of data) and do a MATCH AGAINST queries in order to search efficiently. LIKE is painfully slow on huge amounts of text, this is well know and should be avoided.

    http://dev.mysql.com/doc/refman/5.5/en//fulltext-search.html

    You could also keep them in the FS and build yourself command line tools that you call from within your server-side language that actually do “GREP style” searching and return the list of file paths of those that match your “query”, but I’m not sure if this will be efficient.

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

Sidebar

Related Questions

I'm trying to store an image into an SQL database without using temporary files.
I'm trying to store the size of a queue in an int in C++.
So basically what I'm trying to do is make something like this: http://store.kapit.biz/demo/treemap/prod/index.html# I've
I am trying to store an image in the DataBase, for some reason it
Im trying to store a list,collection of data objects in Hbase. For example ,a
I am trying to store a byteArrayInputStream as File on a FTP Server .
I'm trying to store and retrieve numbers in android so later I can do
I'm trying to store several 2D sprites inside a single texture, since I figured
I'm trying to store a std::map on a shared memory segment. But I'm not
I'm trying to store BitmapData from a MovieClip that is a PNG with transparency.

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.