Opened 5 years ago

Closed 2 years ago

Last modified 2 years ago

#826 closed Erweiterung (fixed)

Sonderpreise - xtcCheckSpecials() - Performance

Reported by: webald Owned by: somebody
Priority: normal Milestone: modified-shop-2.0.5.0
Component: Shop Version: 2.0.1.0

Description

die Funktion xtcCheckSpecials() in includes/classes/xtcPrice.php:

  function xtcCheckSpecial($pID) {
    if ($this->cStatus['customers_status_specials'] == '1') {
      $product_query = xtDBquery("SELECT specials_new_products_price
                                    FROM ".TABLE_SPECIALS."
                                   WHERE products_id = '".$pID."'
                                     AND status = 1
                                     AND (start_date IS NULL 
                                          OR start_date <= NOW())
                                  AND (expires_date >= NOW() OR expires_date IS NULL)");
      if (xtc_db_num_rows($product_query, true) > 0) {
....


und in der DB dazu passend:

ALTER TABLE `specials` ADD INDEX(`start_date`);
ALTER TABLE `specials` ADD INDEX(`expires_date`);

Attachments (0)

Change History (5)

comment:1 Changed 3 years ago by Tomcraft

  • Milestone modified-shop-2.1.0.0 deleted

comment:2 Changed 2 years ago by GTB

  • Milestone set to modified-shop-2.0.5.0

comment:3 Changed 2 years ago by GTB

  • Resolution set to fixed
  • Status changed from new to closed

In 11975:

fix #826

comment:4 Changed 2 years ago by Tomcraft

In 11976:

Addition on r11975 (fix #826)

comment:5 Changed 2 years ago by GTB

In 12022:

revised r11975 (fix #826)

Add Comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.