jw-wpcli-shortcode-scraper icon indicating copy to clipboard operation
jw-wpcli-shortcode-scraper copied to clipboard

Regex in query instead of PHP?

Open blobaugh opened this issue 7 years ago • 1 comments

Jay! This is awesome!

It looks like right now all the posts are being pulled out and parsed via PHP. You may be able to get performance improvements querying MySQL directly and ditching the PHP layer. What do you think of trying out a direct regex on the db with something like https://dev.mysql.com/doc/refman/8.0/en/regexp.html ?

blobaugh avatar Oct 05 '18 13:10 blobaugh

@blobaugh I honestly had the same thought, I just haven't messed with SQL regex like, ever. I wouldn't mind a PR 😄

I wonder the performance implications from using pure SQL?

JayWood avatar Oct 05 '18 18:10 JayWood