Some crawler bot found a site of mine and within few hours it generates >2GB of slow queries log.
There was a lot of queries like this: https://prnt.sc/lgrf1y
Is it possible to optimize these somehow?
same queries here .. he thinks its from the inventory view
http://forum.virtuemart.net/index.php?topic=141361
I digged a bit and found this in VirtueMartModelProduct
//This option switches between showing products without the selected language or only products with language.
if( $app->isSite() ){ //and !VmConfig::get('prodOnlyWLang',false)){
if((empty($this->keyword) or $group !== FALSE) and self::$omitLoaded and self::$_alreadyLoadedIds){
$where[] = ' p.`virtuemart_product_id`!='.implode(' AND p.`virtuemart_product_id`!=',self::$_alreadyLoadedIds).' ';
//$where[] = ' p.`virtuemart_product_id` NOT IN ('.implode(',',self::$_alreadyLoadedIds).') ';
}
} else {
//$joinLang = true;
}
When I removed this code part, the server worked fine.
As far as I can see, it's mod_virtuemart_products. I disabled 'omitLoaded' in every module, I don't need it actually, but maybe it worth to check. I'm not sure WHY the 'NOT IN' version was replaced to this
NOT IN is limited to a certain number of data, it's perhaps why they removed it.
But internally, if i'm right, Mysql change NOT IN to the appropriate query AND `virtuemart_product_id`!= ... so it's strange that one do a slow query and not the other one
changed in the new core vm3.4.3 to use not in and has doubled speed in case a lot products got already loaded.