I'm seeing this query come up a lot in devel:
0.462advagg_insert_bundle_db
SELECT checksum FROM advagg_files WHERE filename_md5 = '17d70dccb2b9f8a42f0557f3510e1c3d'
It sometimes appears twice for the same md5 hash, also there can be a lot of different individual queries for individual filenames on a page.
There's currently 200 records in this table on the site I'm looking at, it's a complex site so that ought to be close to the maximmum. So I'm wondering if when one checksum is needed, it wouldn't be worth just loading all of them and static caching them - would be a small amount of data to load and save quite a few queries on pages that need it.
Comments
Comment #1
mikeytown2 commentedLooks like this query could be improved.
Pull
Out of the loop.
Comment #2
mikeytown2 commentedMarking as won't fix as in I will not be writing this patch. I've laid out what needs to happen so creating a patch in this case should be easy to do. Re-open with a patch with a better query and I'll commit it.