Very slow query on table with Blob column
You need an index starting with ActLogId.

The indexes with lots of columns are likely to be not very useful.  Recommend getting rid of them, and redesign the indexes.

"Prefix" indexing (PhotoFile(20)) is rarely useful.

Read this cookbook for tips on creating the optimal index for a query.

where PhotoID &gt; 0 AND ActLogId = 20992 needs a composite INDEX(ActLogId, PhotoID), in that order (= first).