5th semester at school is pretty much over by now. Only one small assignment to do on upcoming Tuesday Thursday. Hopefully, I will write about the semester at some point.
On Monday I am going to do PHP tests for the internship that I applied for. I am preparing for it at the moment by solving Testdome PHP exercises and PHP interview questions. If I succeed it would be a huge step for me to become a sufficient Magento developer one day.
Today I have to admit I did not open IDE somehow for more than just one line of code 😀 Got stuck into analyzing the logs and cleaning one of my website’s database.
All in One SEO plugin (do not recommend!) created around 3 million garbage entries into the WP+WooCommerce database with scheduled actions (mainly by aioseo_sitemap_ping). It is multiple times more than the whole site itself.
wp_actionscheduler_logs table had 1 973 366 entries
wp_actionscheduler_actions table had 912 058 entries
I emphasize that these entries are just unwanted garbage and do not create any value. In order to clear it you need to enter the database (through PMA or some other way) and run DELETE FROM table WHERE ...; SQL query. I can assure that deleting millions of entries takes some time from database engine 🙂
The only line I wrote today (except SQL queries) was add_filter( 'aioseo_sitemap_ping', '__return_false' ); to kill the unnecessary scheduled action.
Primary key (PK) is skipping values for some reason. This was an issue I spent time solving until I discovered that auto increment column increases after insertion error occurs. To avoid duplicates on this website I set rule on MySQL side that if three colums match then don’t insert (give insertion error and continue). This way I had hundreds of insertion errors every hour and therefore PK was growing rapidly.