Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Slow loading of sections


nwcdan

Recommended Posts

Posted

Currently Os Commerce V2.2 is installed and I've been asked to look into what could contribute to some sections of the site loading slowly.

 

The site is at www.musicbooksplus.com if you want to take a look and see what I mean.

 

Now the homepage loads fine, and other individual pages such as products, however loading a "category" takes a good 5-10seconds to load, which isn't always good for business.

 

If you go to the site down the left side there is a category drop down box to see what I mean. Also the search function acts fairly slowly. Although I've been told that has been re written from the vanilla Os Commerce style search to be more of a Google style search, so I'm not sure if perhaps the rewritten search function has slow sql queries.

 

They've told me that they have tried moving the site to a more powerful server but that had no results and was still slow.

 

essentially I'm just wondering if there are any suggestions to speeding up Os commerce in these areas. Hopefully if you check out what I mean you can see how slow it is.

 

Any suggestions would be great.

 

Thanks!

Posted

Had one site where they had installed dynamic category menu which create 9000 lines of html.

 

Took ages to find, did all sql optimisation before checking the obvious.

 

G

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Posted

1

After the

</head>

 

add

<?php flush(); ?>

 

to each file in root of you store except checkout_process.php

 

2

Run this sql on your store's database it will add indexes and speed it up

ALTER TABLE `products_to_categories` DROP PRIMARY KEY;
ALTER TABLE `products_to_categories` ADD INDEX `idx_p2c_categories_id` ( `categories_id` );
ALTER TABLE `products_to_categories` ADD INDEX `idx_p2c_products_id` ( `products_id` );
ALTER TABLE `categories` ADD INDEX (`sort_order`);
ALTER TABLE `customers` ADD INDEX (`customers_email_address`);
ALTER TABLE `orders` ADD INDEX (`customers_id`);
ALTER TABLE `products` ADD INDEX (`products_model`), ADD INDEX (`products_price`), ADD
INDEX (`products_date_available`), ADD INDEX (`manufacturers_id`);
ALTER TABLE `products_attributes` ADD INDEX (`products_id`), ADD INDEX (`options_id`);
ALTER TABLE `products_options` ADD INDEX (`products_options_name`);
create index IDXSPECIALSPRICE on specials (products_id,status,specials_new_products_price);

 

That site has a lot of products without indexes it will slow down big time

Posted

I found this on the web:

database structure optimisation - in older osCommerce versions not all database indices were properly implemented. For example, almost any osCommerce web site requires database indices for tables that are used for Best Selling and Customers Who Bought This Product Also Bought features, and these indices were often missing in old installations of osCommerce. Here one can find more information on how to build and use indices:

 

A help link points us to: http://dev.mysql.com/doc/refman/5.0/en/opt...-structure.html

 

 

Having looked at the website, I noticed the slow loading time on both selecting a category from the dropdown and from the "search" box. I am no expert by any means, but I do know that the category dropdown style was coded back in 2003, ref: http://addons.oscommerce.com/info/956 After you populate a table on the site then choose a product the item loads quickly. This would lead me to believe that the coding of the fetch statement or the table structure of the categories needs to be tweeked. The site has what appears to be alot of products, so even minor things a smaller shop could over look becomes important.

 

You may also want to look at: http://www.php-accelerator.co.uk/.

 

I am curious as to what others believe could be the issue here as I am working on a shop with about 20,000 products.

Posted
I am curious as to what others believe could be the issue here as I am working on a shop with about 20,000 products.

Some people get bored answering the same questions over and over again...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...