View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006129 | OXID eShop (all versions) | 4. ------ eShop Core ------- | public | 2015-04-22 11:42 | 2022-01-28 17:19 |
Reporter | d3 | Assigned To | |||
Priority | low | Severity | feature | Reproducibility | have not tried |
Status | resolved | Resolution | fixed | ||
Fixed in Version | 6.0.0 | ||||
Summary | 0006129: update query on oxseo can cause performance issue | ||||
Description | In 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" | ||||
Tags | No tags attached. | ||||
Theme | Azure | ||||
Browser | All | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
|
KH |
|
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. |
|
This was changed 7 years ago with https://github.com/OXID-eSales/oxideshop_ce/commit/c34090383be7aaa7afe6fcc7166a45c6574c49c1 |