
Originally Posted by
strelitzia
I've come across an issue with this module.
As the number of entries in reward_status_track table increases, loading the admin page takes longer and longer.
A site I just fixed had around 9700 entries, and admin was crashing every time I tried to load customers_reward_points.php
TTFB was in excess of 2 minutes!
I resolved this issue by applying an index to the database table like
ALTER TABLE `reward_status_track` ADD INDEX(`customers_id`);
Admin now loads instantly.
Please update your installer to include this index on the database table
Where exactly do we do this? Should I use the Admin->Install SQL Patches or can I copy and past this into the Installation SQL in this area:
Code:
CREATE TABLE reward_status_track (
rewards_id INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
customers_id INT( 11 ) NOT NULL ,
orders_id INT( 11 ) NOT NULL ,
date DATETIME NOT NULL ,
reward_points DOUBLE( 15, 4 ) NOT NULL ,
status TINYINT( 1 ) NOT NULL,
UNIQUE (orders_id));
ALTER TABLE `reward_status_track` ADD INDEX(`customers_id`);
before I complete the installation or can I just stick it anywhere at the bottom of the page? Also, if I am to add it to the Installation SQL would I write it like this
Code:
ALTER TABLE reward_status_track ( ADD INDEX(customers_id));
or exactly as it is written above?
Bookmarks