If this is your first visit, check our documentation. To post, register or login.
Forums / Setting Up Your Zen Cart Products / Setting Up Categories, Products, Attributes / Will unchecking the pink "Discounted" Attribute Box in controller speed up database?

Will unchecking the pink "Discounted" Attribute Box in controller speed up database?

Started by sports_guy on 13 Apr 2015, 6:32 PM · Views: 766

Results 1 to 5 of 5
13 Apr 2015, 6:32 PM
#1
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

Will unchecking the pink "Discounted" Attribute Box in controller speed up database?

I have a website that sells picture frames. I started a previous post because each product (picture frame) has many, many attributes. I was able to remove some attributes to speed up the database.

On my old site right now each query is bringing back these numbers:

Querries: 11090
Querry Time: 7.73999151993
Parse Time: 8.428

That is on an older PHP version and MySQL which used to run fast for many years but now my product pages (only) run very slow. Because I have to load so many attributes. For many years until my PHP version on my server changed this site used to load in or under a couple of seconds. Not anymore. So I am upgrading the site thinking a newer PHP and MySQL will load more quickly and be more stable. I know how to cut the querries in half by cutting my picture frame width vs height sizes in half (offering up to 40" instead of the the larger 80" per side).

Someone told me to uncheck the pink "Discounted" Atributes box for each of my mat colors and I did so. It cut down on the querries and gave me a slightly faster load time. I would like to uncheck this box on all my attributes but most have a price attached and a weight. And I do offer discount coupon codes. Right now 1/2 off each product, but no discount per attribute. **When is it safe to uncheck this box for any/all attributes? **

My thinking is that if I don't need this "Discounted" box checked I can disable on any attribute thereby, shaving the amount of querries the database has to return. Just trying to shave time off my uncessary database querries.

Building a better web, one site at a time: Dayton Web Design

13 Apr 2015, 10:10 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Will unchecking the pink "Discounted" Attribute Box in controller speed up database?

sports guy:

I have a website that sells picture frames. I started a previous post because each product (picture frame) has many, many attributes. I was able to remove some attributes to speed up the database.

On my old site right now each query is bringing back these numbers:

Querries: 11090
Querry Time: 7.73999151993
Parse Time: 8.428

That is on an older PHP version and MySQL which used to run fast for many years but now my product pages (only) run very slow. Because I have to load so many attributes. For many years until my PHP version on my server changed this site used to load in or under a couple of seconds. Not anymore. So I am upgrading the site thinking a newer PHP and MySQL will load more quickly and be more stable. I know how to cut the querries in half by cutting my picture frame width vs height sizes in half (offering up to 40" instead of the the larger 80" per side).

Someone told me to uncheck the pink "Discounted" Atributes box for each of my mat colors and I did so. It cut down on the querries and gave me a slightly faster load time. I would like to uncheck this box on all my attributes but most have a price attached and a weight. And I do offer discount coupon codes. Right now 1/2 off each product, but no discount per attribute. **When is it safe to uncheck this box for any/all attributes? **

My thinking is that if I don't need this "Discounted" box checked I can disable on any attribute thereby, shaving the amount of querries the database has to return. Just trying to shave time off my uncessary database querries.

I would say that you've already answered the question. The time when this is needed is when you want the attribute to also be discounted. If there is no intention to discount a product's attributes in addition to the base cost, then the checkbox can remain off. At a later time the applicable products can have their switch changed and it would only affect loading of those product.

Ideally though, a more refined method of presenting the product would overall make this issue less of one... Splitting product into various groups, is one thing, or refining some of the attribute searches could be another. Even splitting your inch graduations into whole inch numbers and sub-inch numbers would eliminate a large number of the graduations...

Ie. 40", 41", 42", 43", 44", 45"
and 0.0", 0.1", 0.2", 0.3", 0.4", 0.5", 0.6", 0.7", 0.8", 0.9"

Right here, would go from one attribute having 60 increments to 15 increments being listed, and that's only for 6 1" increments.. You're talking about eliminating 40 1" increments, which would reduce ~400 listings down to about 50... That's a huge savings...

Don't know if something like this has already been implemented or considered, but it's an idea...

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

13 Apr 2015, 11:42 PM
#3
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Will unchecking the pink "Discounted" Attribute Box in controller speed up database?

If I could make a suggestion based upon my picture framing days. I understand picture framing and that you cannot break these products into multiple products. I'm pretty sure that the pink must be selected IF the attribute affects the price in any way OR IF they are discounted.

For dimensions, consider have the customer round the artwork visual dimensions DOWN to the nearest 1/4 inch. Having the matboard cover 1/8" around generally won't hurt and it cuts your attributes by a factor of 4. Might be an issue if NO matboard is selected. The rabbet & standard allowance can hide a multitude of sins.

Drop mat borders to half or one inch increments. Most consumers probably will never realize.

There is a potential bug in your glazing selection pricing. It allows (and prices) acrylic and glass if a person accidentally chooses both.

Merge glazing into a single attribute. Select none, acrylic or glass. Drops the calculations by 25%

I'm assuming all matboard is priced by the ON/OFF selector and color selections have a $0 price increment, so pink can be deselected on those.

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

14 Apr 2015, 1:04 AM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Will unchecking the pink "Discounted" Attribute Box in controller speed up database?

While the breakdown of sizes ina single attribute selection could be lessened to quarter inches to provide a reduction factor of four, a further reduction to having those fourths in a separate set of selections (also ensuring that the option is a mandatory choice) willreduce the number of attributes to be pulled from the database.

Beyond that I cannot speak to framing, but the below:

RixStix:

If I could make a suggestion based upon my picture framing days. I understand picture framing and that you cannot break these products into multiple products. I'm pretty sure that the pink must be selected IF the attribute affects the price in any way OR IF they are discounted.

The choice of having the selection of "pink" active or not is related to howthat price is to be considered when a special is offered on the product. If the price of the attribute is to remain constant then the option can be turned off. If the price of the attribute is to change with the specialthan it needs to remain active. Perhaps insucha discount situation, because other values are always searched (no off switch for say subtracting a set value) to ensure customer satisfaction, you may need to include a value to subtract from the attributes price when that product is on sale. Otherwise a sale of 15% for example won't come out tobeing 15% less...

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

14 Apr 2015, 1:45 AM
#5
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

Re: Will unchecking the pink "Discounted" Attribute Box in controller speed up database?

Wow great feedback all around! In the docs I also found this: How do I speed up my site. (Item 4b) but its not as detailed as your feedback. You can see my old site here: http://www.framesforlife.com/index.php?main_page=product_info&cPath=11&products_id=32 (warning the page will take around 8 seconds to load). The frames feedback is definately pertinent to my setup.

I tried to delete some of the fractions of an inch and it did cut down on the queries a little. So it helps, but the client wants the inch fractions to be at 1/16 for now.

The new store with the same exact attributes (I just finished entering) is only loading in 1.2 seconds with 571 queries. Blazing fast now, but I don't want these to build up like my old store, so I am trying to tweak all my attribute settings now, before I mass copy them into 500+ products (frames).

  • All my width and length attributes (plus all my fractions) have: a + price, + weight, price factor, and sort order defined for each attribute. (This is the bulk of my attributes).
  • Mat colors have optimized attribute images with no price or weight increase. I did uncheck the "Discounted" on all mat options since this option does not have price attached.
  • Mat border attribute sizes have three specifications each: + price, + weight, and sort order.
  • Add: Foam Core Backing, Single Mat, Acrylic, Conservation Glass are simple attributes with little specifications. Just one price and weight add-on for each yes.

Its the width vs height and fraction drop-downs that add the bulk of strain on the database.

So you can see why I am trying to optimize these attributes now before I spend days to weeks, copying them to my 500+ products.

Building a better web, one site at a time: Dayton Web Design