Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@erikhansen
Last active March 26, 2024 14:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save erikhansen/99bfa112e1790f150317465c51b5dd51 to your computer and use it in GitHub Desktop.
Save erikhansen/99bfa112e1790f150317465c51b5dd51 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`);
@goivvy
Copy link

goivvy commented Dec 12, 2019

Just don't use activity log and you will be fine.

@erikhansen
Copy link
Author

@goivvy Agreed! For another merchant using this extension, we disabled the "Enable Customers' Activity Log" setting (it's enabled by default) to prevent any issues related to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment