View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007628 | OXID eShop (all versions) | 4.01. Database handling | public | 2024-04-08 15:58 | 2024-09-11 15:05 |
Reporter | AdrianFrey | Assigned To | |||
Priority | normal | Severity | tweak | Reproducibility | always |
Status | confirmed | Resolution | open | ||
Summary | 0007628: Unnecessary performance issue with queries for getOne | ||||
Description | There are still queries for 'public function getOne($query, $parameters = []);' which are not limited with LIMIT. vendor/oxid-esales/oxideshop-ce/source/Application/Model/Article.php vendor/oxid-esales/oxideshop-ce/source/Application/Model/Basket.php vendor/oxid-esales/oxideshop-ce/source/Application/Model/Discount.php vendor/oxid-esales/oxideshop-ce/source/Application/Model/DiscountList.php vendor/oxid-esales/oxideshop-ce/source/Application/Model/Order.php vendor/oxid-esales/oxideshop-ce/source/Application/Model/Search.php vendor/oxid-esales/oxideshop-ce/source/Application/Model/User.php vendor/oxid-esales/oxideshop-ce/source/Application/Model/Voucher.php vendor/oxid-esales/oxideshop-ce/source/Core/SeoEncoder.php vendor/oxid-esales/oxideshop-ce/source/Core/Utils.php vendor/oxid-esales/oxideshop-ee/Core/Config.php | ||||
Additional Information | public function getOne($query, $parameters = []); https://github.com/OXID-eSales/oxideshop_ce/blob/87a3c096832e7efc2c3cdd8ed699ed510efad83c/source/Core/Database/Adapter/DatabaseInterface.php#L117 The comment also tells, that you should use LIMIT | ||||
Tags | No tags attached. | ||||
Theme | Not defined | ||||
Browser | Not defined | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
|
I recognize the problem, but would also like to add that the many function calls I've seen don't cause much overhead, in part because they directly consider an OXID to be a unique value. Nevertheless, there are function calls that have a correspondingly large intermediate result for large amounts of data, which is then reduced to a single result with fetchColumn. OXID 7.1 still uses fetchColumn, which is marked as depricated. QA - SG - |