Forums / All Other Contributions/Addons / Query Cache v1.0

Query Cache v1.0

Started by data_digger on 5 Jan 2009, 10:56 AM · Views: 36,403

Results 121 to 133 of 133
3 Aug 2012, 11:01 AM
#121
ttfan avatar

ttfan

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
231
Plugin Contributions:
0

Query Cache v1.0

THanks again for you help!

It seems to work well... a lot less queries, although I'm not quite sure if the Parse time has improved much... perhaps when the server is busy the improvement will be much more obvious.

28 Nov 2012, 5:22 PM
#122
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Re: Query Cache v1.0

Hello Everyone ,

Is this module still useful and compatible with v.1.5.0 also ?

Thank you very much !

28 Nov 2012, 6:51 PM
#123
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Query Cache v1.0

It's built-in to v1.5.1

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

26 Mar 2013, 3:38 AM
#124
eric_chen avatar

eric_chen

New Zenner

Join Date:
May 2012
Posts:
39
Plugin Contributions:
0

Re: Query Cache v1.0

Hello, Everyone,

I installed the plugin in my website. It seems quite good and reduce many sql query.
without Query Cache: 2000+ queries
with Query Cache v1.6: about 500 queries

But it seems having a bug. My website in browser will show following wrong code when I upload a product to my store.

1062 Duplicate entry 'ca34fbe5f9a075091ad59abf02c259a7-1' for key 1
in:
[INSERT INTO seo_cache (cache_id, cache_language_id, cache_name, cache_data, cache_global, cache_gzip, cache_method, cache_date, cache_expires) VALUES ('ca34fbe5f9a075091ad59abf02c259a7', '1', 'seo_urls_v2_products', /GbVE6QO7VPWmV2X+v2B7jb8RuacilmdVghNzVjNS1US7i1Pn/PhT/K4j2YLH6jlv7iYbBhjD6abt5uZMCymyYs0Bzt/wc=', '1', '1', 'EVAL', '2013-03-26 03:27:49', '2013-04-25 03:27:49')]

The above wrong code only shows one time on browser, after I upload a new product into my store. And then my website is OK if I repeat to click any page. Please anyone has ever met the same issue, or any advise regarding above wrong code. Thank you in advance.

26 Mar 2013, 4:34 PM
#125
infogate avatar

infogate

New Zenner

Join Date:
Jun 2009
Location:
Thessaloniki, Greece
Posts:
41
Plugin Contributions:
0

Re: Query Cache v1.0

Eric Chen:

Hello, Everyone,

I installed the plugin in my website. It seems quite good and reduce many sql query.
without Query Cache: 2000+ queries
with Query Cache v1.6: about 500 queries

But it seems having a bug. My website in browser will show following wrong code when I upload a product to my store.

1062 Duplicate entry 'ca34fbe5f9a075091ad59abf02c259a7-1' for key 1
in:
[INSERT INTO seo_cache (cache_id, cache_language_id, cache_name, cache_data, cache_global, cache_gzip, cache_method, cache_date, cache_expires) VALUES ('ca34fbe5f9a075091ad59abf02c259a7', '1', 'seo_urls_v2_products', /GbVE6QO7VPWmV2X+v2B7jb8RuacilmdVghNzVjNS1US7i1Pn/PhT/K4j2YLH6jlv7iYbBhjD6abt5uZMCymyYs0Bzt/wc=', '1', '1', 'EVAL', '2013-03-26 03:27:49', '2013-04-25 03:27:49')]

The above wrong code only shows one time on browser, after I upload a new product into my store. And then my website is OK if I repeat to click any page. Please anyone has ever met the same issue, or any advise regarding above wrong code. Thank you in advance.

Witch is the Zen Cart version you are using query cache?

My Online Store thanks to Zen Cart
If everything else fails.... read the f@#$%ing manual :)
And always remember before any change!!! Backup to be able to go back!

31 Mar 2013, 6:03 AM
#126
eric_chen avatar

eric_chen

New Zenner

Join Date:
May 2012
Posts:
39
Plugin Contributions:
0

Re: Query Cache v1.0

infogate:

Witch is the Zen Cart version you are using query cache?
The Zen Cart version is 1.3.8a. Thank you.

31 Mar 2013, 1:15 PM
#127
infogate avatar

infogate

New Zenner

Join Date:
Jun 2009
Location:
Thessaloniki, Greece
Posts:
41
Plugin Contributions:
0

Re: Query Cache v1.0

Eric Chen:

The Zen Cart version is 1.3.8a. Thank you.

I suggest unistall V1.7 cause it is tested and works fro 1.3.9 installations and try an older version like 1.6 or 1.6.1.

The other option is to update zencart installation :)

If you're not upgrading for awhile, a good idea is to try one of the following tips ---> http://www.data-diggers.com/advanced-zen-cart-performance-tips/

Remember before any change!!! Backup to be able to go back!

My Online Store thanks to Zen Cart
If everything else fails.... read the f@#$%ing manual :)
And always remember before any change!!! Backup to be able to go back!

18 May 2013, 2:46 AM
#128
katrobb avatar

katrobb

New Zenner

Join Date:
Nov 2006
Posts:
45
Plugin Contributions:
0

Re: Query Cache v1.0

DrByte:

It's built-in to v1.5.1
The query cache in my v1.5.1 does not seem to be working.
For example on the same product, my test v1.5.1 showed
Parse Time: 5.188 - Number of Queries: 699 - Query Time: 3.60574690321.

My v1.3.9h showed
Parse Time: 1.840 - Number of Queries: 102 - Query Time: 0.152396841141.

When installing v1.5.1, I chose File under SQL Cache Method. I have not moved the cache file above the Zencart folder yet.

Is there something else that we are suppose to do to make the Query Cache work like it did in the v1.3.9h?

Katrina Robb
KatalinaKlark.com

20 May 2013, 3:38 PM
#129
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Query Cache v1.0

katrobb:

The query cache in my v1.5.1 does not seem to be working.
For example on the same product, my test v1.5.1 showed
Parse Time: 5.188 - Number of Queries: 699 - Query Time: 3.60574690321.

My v1.3.9h showed
Parse Time: 1.840 - Number of Queries: 102 - Query Time: 0.152396841141.

...
Your server seems rather slow (database for sure, also the PHP code) - you may want to look into the performance of your hosting / testing environment.

Results from a clean installation of ZC 1.5.1 w/ the SQL_CACHE_METHOD patch and the USU plugin:
ZC 1.5.1 (Query Cache: off, SQL_CACHE_METHOD: none): Parse Time: 0.507 - Number of Queries: 831 - Query Time: 0.22103139341736
ZC 1.5.1 (Query Cache: on, SQL_CACHE_METHOD: none): Parse Time: 0.470 - Number of Queries: 402 - Query Time: 0.19609870233154
ZC 1.5.1 (Query Cache: on, SQL_CACHE_METHOD: file): Parse Time: 0.419 - Number of Queries: 376 - Query Time: 0.16558531408692

NOTE: Using "test data", default settings (including EZ-Pages and sideboxes), and accessing the product page for "Matrox G200 MMS" (two attributes). Zen Cart is running on a LAMP VM (Core2 VCPU limited to 20-50% of a single core w/ 512G mem). LAMP VM is running Apache mpm-prefork + PHP 5.4 + MySQL 5.5. Same VM is also running multiple other websites (and other web applications). QC was disabled for tests by commenting out the appropriate auto loader lines.

As you can see the Query Cache does have an effect. Note using the SQL_CACHE_METHOD only affects a VERY small number of queries (ones which have potential to be slow) - thus the small impact enabling this option had in my test environment. But yes there are a few differences between QC 1.6/1.7B and the QC included in Zen Cart 1.5.1.

If I remember correctly (it has been awhile since I looked at QC 1.6/1.7B), QC 1.6/1.7B added changes to Zen Cart which resulted in the category and product name/id/parent mappings being read into memory early on and then using functions to return these where Zen Cart needed this information. This is done at the expense of additional memory being required by each page request.

The Zen Cart 1.5.1 version of QC does not do this which results in a greater number of SQL calls overall, but reduces the amount of memory required / used by a single call to Zen Cart. This reduces the potential for the server to "run out of memory" potentially forcing additional disk I/O or "out of memory" crashes of PHP.

As SQL calls are typically very fast, hosting providers often limit memory usage, and disk I/O is usually the biggest bottleneck... Having a balance between "saved SQL calls" and "memory usage" in the Zen Cart 1.5.1 version of QC makes sense. In most hosting environments were I have installed Zen Cart, making the extra 200-300 small (returned data) SQL calls instead of a few large (returned data) SQL calls does not make much difference...

However if your MySQL server is not hosted on the same server as your web server (such as a different hosting provider, in rare cases)... And there is a substantial network delay for connecting and retrieving data from the remote MySQL server... You may wish to add back in some additional caching... Or talk to your providers about why the communications are so slow...

Or better yet just make sure both the MySQL server and Web Server are on the same local network (or server) and not overloaded...

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

13 Aug 2013, 5:51 PM
#130
waterbender avatar

waterbender

New Zenner

Join Date:
May 2010
Posts:
84
Plugin Contributions:
0

Re: Query Cache v1.0

Hi, is this module on the plugin page still compatible with the latest zen cart v1.5.1?

13 Aug 2013, 5:59 PM
#131
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Query Cache v1.0

waterbender:

Hi, is this module on the plugin page still compatible with the latest zen cart v1.5.1?

It's already built-in.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

13 Aug 2013, 6:09 PM
#132
waterbender avatar

waterbender

New Zenner

Join Date:
May 2010
Posts:
84
Plugin Contributions:
0

Re: Query Cache v1.0

wonderful, thank you :)

25 Apr 2015, 12:29 PM
#133
eric_chen avatar

eric_chen

New Zenner

Join Date:
May 2012
Posts:
39
Plugin Contributions:
0

Re: Query Cache v1.0

I installed the plugin in my website. It seems quite good and reduce much sql query.
without Query Cache: 2000+ queries;
with Query Cache v1.6: about 500 queries;

But now a problem is happening. My website in browser will show following wrong code when I upload a product to my store.

1062 Duplicate entry '4404c1df54fdb1291c8dd9bb259f32a9-1' for key 1
in:
[INSERT INTO seo_cache (cache_id, cache_language_id, cache_name, cache_data, cache_global, cache_gzip, cache_method, cache_date, cache_expires) VALUES ('4404c1df54fdb1291c8dd9bb259f32a9', '1', 'seo_urls_v2_manufacturers', 'AwA=', '1', '1', 'EVAL', '2015-04-25 04:37:54', '2015-05-25 04:37:54')]

The above wrong code only shows one time on browser, after I upload a new product into my store. And then my website is OK if I repeat to click any page. Please anyone has ever met the same issue, or any advise regarding above wrong code.

So far, I still have not got any solution... Any advise from any buddy!!!