0

I have a large table on the MySQL database where it has more than 100,000 records

the problem I have a column called "profile_picture" containing the binary date of the image saved on this column.

So, the select query on this table is very very slow. How I can optimize that?

2
  • 6
    Please post TEXT of the A) QUERY and the results of B) SHOW CREATE TABLE tbl_name; and C) SHOW TABLE STATUS tbl_name; for each table involved and D) EXPLAIN SELECT SQL_NO_CACHE (rest of your query). Mar 20 at 14:49
  • 1
    What is a "binary date"? "00110100111010001110101"?
    – Rick James
    Mar 20 at 16:36

1 Answer 1

0

... large table ... more than 100,000 records

That's not "large" - not even close to "large". Stick a handful of zeroes on the end of that and you're getting up to "large".

the problem ... column called "profile_picture" containing the binary data of the image ...

In itself, that column should not be an issue.

So, the select query on this table is very very slow. How I can optimize that?

By tuning the query.

Now, there are a lot of really good people around here but, as far as I know, none of them are psychic.
Show us the errant query and the structure of the table(s) that it uses.

Most likely, you're query is filtering rows by a column that doesn't have an index on it but, until we see the actual query, we can't be sure.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.