View Issue Details

IDProjectCategoryView StatusLast Update
0006129OXID eShop (all versions)4. ------ eShop Core -------public2022-01-28 17:19
Reporterd3 Assigned To 
PrioritylowSeverityfeatureReproducibilityhave not tried
Status resolvedResolutionfixed 
Fixed in Version6.0.0 
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 VersionNot defined
Database VersionNot defined

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

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.

SvenBrunk

2022-01-28 17:19

administrator   ~0013564

This was changed 7 years ago with https://github.com/OXID-eSales/oxideshop_ce/commit/c34090383be7aaa7afe6fcc7166a45c6574c49c1