View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004704 | OXID eShop (all versions) | 4.05. Performance | public | 2012-11-13 16:09 | 2012-12-10 13:29 |
Reporter | michael_keiluweit | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 4.7.0 / 5.0.0 revision 51243 | ||||
Fixed in Version | 4.7.1 / 5.0.1 revision 52468 | ||||
Summary | 0004704: WIth 6700 articles, the query of crossselling can heavy slow down the server | ||||
Description | The query (application\models\oxarticlelist.php loadArticleCrossSell()): -----------8<-----(snip)-------------- // 0000525 bidirectional crossselling if ( $myConfig->getConfigParam( 'blBidirectCross' ) ) { $sSelect = "select distinct $sArticleTable.* from oxobject2article left join $sArticleTable on (oxobject2article.oxobjectid=$sArticleTable.oxid or oxobject2article.oxarticlenid=$sArticleTable.oxid) "; $sSelect .= "where (oxobject2article.oxarticlenid = $sArticleId or oxobject2article.oxobjectid = $sArticleId )"; $sSelect .= " and $sArticleTable.oxid is not null and " .$oBaseObject->getSqlActiveSnippet(). " having $sArticleTable.oxid!=$sArticleId order by rand()"; } -----------8<-----(snip)-------------- causes a server lag if many articles are selected. Because only X articles are really needed ( $this->setSqlLimit( 0, $myConfig->getConfigParam( 'iNrofCrossellArticles' ));) it is maybe an overload to select all possible articles, rand them and cut the result with the parameter iNrofCrossellArticles. | ||||
Tags | Performance | ||||
Theme | Both | ||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||
child of | 0004857 | resolved | Linas Kukulskis | Cross-Selling Statement Optimization |
|
Reminder sent to: michael_keiluweit can you attach dump of this db: at least this two tables: oxarticles and oxobject2article? |
|
optimized query |