View Issue Details

IDProjectCategoryView StatusLast Update
0006129OXID eShop (all versions)4. ------ eShop Core -------public2015-12-01 12:25
Reporterd3 
PrioritylowSeverityfeatureReproducibilityhave not tried
Status acknowledgedResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0006129: update query on oxseo can cause performance issue
DescriptionIn oxSeoEncoder::markAsExpired is an incorrect check on a given parameter:
$sWhere .= $iLang ? ($sWhere ? " and oxlang = '{$iLang}'" : "where oxlang = '{$iLang}'") : '';

If $iLang = 0 (standard language), there will never be "and oxlang = '0'" added.

Please change to
$sWhere .= isset($iLang) ? ($sWhere ? " and oxlang = '{$iLang}'" : "where oxlang = '{$iLang}'") : '';

The Side Effect is: without the other parameters the query will not use the indexes/keys in table oxseo.
Query: update oxseo set oxexpired = '1' where oxobjectid = '123456'
-> EXPLAIN SELECT * FROM oxseo WHERE oxobjectid = '123456'

Better will be:
Query: update oxseo set oxexpired = '1' where oxobjectid = '123456' and oxlang = "0"
-> EXPLAIN SELECT * FROM oxseo WHERE oxobjectid = '123456' and oxlang = "0"
TagsNo tags attached.
ThemeAzure
BrowserAll
PHP Versionany
MySQL Versionany

Activities

d3

2015-04-22 11:48

reporter   ~0010897

KH

QA

2015-04-24 15:11

administrator   ~0010906

Last edited: 2015-04-24 15:12

View 2 revisions

Reminder sent to: d3

Hi,

since we saw that you already submitted a complete solution for this issue we suggest that you contribute your changes directly to our public GitHub repository on https://github.com/OXID-eSales/oxideshop_ce/ by making a pull request. Please leave a note there with the number of this issue so we can close it here in the bug tracker after it is merged.