Skip to content

Instantly share code, notes, and snippets.

@bsdnomad
Forked from erikhansen/issue.md
Created March 26, 2024 14:53
Show Gist options
  • Save bsdnomad/41918cc6bbfd11ebd461343ef880f58f to your computer and use it in GitHub Desktop.
Save bsdnomad/41918cc6bbfd11ebd461343ef880f58f to your computer and use it in GitHub Desktop.
Amasty M2 Full Page Cache Warmer Issue - Submitted this issue to Amasty on 2019-12-11

I have a client using this extension, and we recently discovered a big performance issue.

Description: The query generated by the \Amasty\Fpc\Model\ResourceModel\Activity::matchUrl method runs a query on a table that is missing an index.

Here is a screenshot showing the slow query:

Slow query in New Relic

Once the client added a MySQL index for the table, the slow query went away:

Screenshot showing descrease in query time

I'd recommend adding an index to the amasty_fpc_activity table for a combination of the url and mobile columns. Something like this:

ALTER TABLE `amasty_fpc_activity` ADD INDEX `URL_MOBILE` (`url`, `mobile`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment