My first site is almost done, but I am unhappy with how slow the filter-drop downs are populating. My site is for auto-parts so I have many categories with sub categories (Parts -> Type -> Make -> Model). All together I have 6236 categories/sub-categories, which yes I know is alot.
I have noticed that for every filter, whether the car make has 2 models or 30 models, the load times are always similar (8.5s-9s). After running Query Monitor, on every page I am getting the same query being called WP_Term_Query->get_terms() and it has 6236 rows, the exact same as the total of categories I have! Here are some screenshots of Query Monitor, one is for the "homepage" filter, the second is for the "post ad" filter.
I am only a beginner at WordPress and have built this site off the back of this theme I purchased. I have been able to solve most of the problems I have faceed by myself, but this one is way over my head. Others I have talked to have said that it is something to do with the transfer of data between the Database and SQL (does this sound right?). Another person with more knowledge looked into the back-end through Cpanel and found that, yes the database has indexes but the query was not using these indexes, rather calling all 6236 categories every single time. Once again I ask, does this sound like a realistic/common problem?
I use W3 Total Cache on the site, but when I turned-on Database Cache, I did not see any improvement.
For further information, I use this shared server on the "Premier" package, (300% CPU, 6GB RAM, 25GB SSD).
Has anyone had a similar problem before? As I said I am just a beginner, so maybe this is simple, maybe I have done something stupid eariler? But any help is appreciated greatly :)
If anyone wants me to provide more screenshots or info just ask, I am more then happy to provide!
You can find the site here. If you want to test the speed of the query for "posting an ad" you will need to create an account. This can be a throwaway one, I dont mind.