Automattic / newspack-content-converter

Plugin that enables automated conversion of pre-Gutenberg post content, to Gutenberg blocks content.
GNU General Public License v2.0
46 stars 13 forks source link

Fix slow query fetching data not used #136

Closed naxoc closed 3 months ago

naxoc commented 3 months ago

The query was doing a MAX() on string data which is probably heavy work for the DB. It was getting meta values but not needing them. This changes it to max on the meta id instead.

How to test

The function is really only ever used on the "Convert" page. Compare the counts with and without the patch.