Solved

Does anyone have any experience with quickcache?

Posted on 2014-03-11
16
414 Views
Last Modified: 2014-03-12
Hi

I'm trying to compress my website.  I have been using a MySQL implementation of quickcache but have run into problems on setup.

I have made the mysql databse called quickcache but cant configure the table.  There is a ms.sql script which is:

CREATE TABLE CACHEDATA (
   CACHEKEY varchar(255) NOT NULL,
   CACHEEXPIRATION int(11) NOT NULL,
   GZDATA blob,
   DATASIZE int(11),
   DATACRC int(11),
   PRIMARY KEY (CACHEKEY)
 );


Can some one help with the break down of this script please.  I want to create the table in mysql which it support.

Cheers

Si
0
Comment
Question by:cybersi
  • 10
  • 6
16 Comments
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 39920880
I'd like to step back from the technical details a little bit and get to the business reasons for trying something like this.  Are you investigating this because the site is slow?
0
 

Author Comment

by:cybersi
ID: 39920893
Hi Ray

I can improve the load time of my site by 80% by using gzip.  I have read that search engines are now timing sites for their crawlers.

Cheers

Si
0
 

Author Comment

by:cybersi
ID: 39920917
Hi Ray

Here is a link if that helps?

http://quickcache.worxware.com/index.php?pg=manual

Also im trying to run the script as shown in the link ie

(in PHPadmin) mysql <quickcache> < script.sql but it fails.

Thanks

Si
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 109

Expert Comment

by:Ray Paseur
ID: 39920950
improve the load time of my site by 80% by using gzip
I think you can do this with a server setting; it doesn't need any MySQL involvement.  What kind of server are you using?
0
 

Author Comment

by:cybersi
ID: 39920955
its a hosted package with fasthosts.  I don't have access to the physical server.
0
 

Author Comment

by:cybersi
ID: 39920958
heres yet another link I have found which explains a bit better -good old google
0
 

Author Comment

by:cybersi
ID: 39920968
using the above sql code do you know from the script how many fields I require for my table and I will do it manually?

Thanks by the way Ray

Si
0
 

Author Comment

by:cybersi
ID: 39920971
0
 

Author Comment

by:cybersi
ID: 39920986
I'm guessing 6
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 39921207
I haven't read all of the betterExplained article, but what I have read looks spot on to me.  Look for the part about these topics (links):
For IIS, enable compression in the settings.  In Apache, enabling output compression is fairly straightforward.
By way of trying to explain what I think you really want to do, let me float a few ideas.

1. The objective is to make the site load faster for the client browser (including web crawlers that behave like client browsers).
2. The ways to do this include (A) send less data to the client browser and (B) make the server scripts run faster.

Thoughts on 2.A: GZIP will help with this, even without any effort to optimize the markup.  If you want to optimize the markup, you will find low-hanging fruit in putting the CSS and JS into a minimum number of linked files.  After the first load, the client browser will cache these and the server will not have to send them again.  Consider using YSlow to learn more about the behavior of the web server and the web site.  Optimize images for the web.

Thoughts on 2.B: Whenever there is a performance problem in a computer application, the solution is always found in the I/O subsystem.  In modern web applications that almost always means the data base, since the server file systems are pretty straightforward and not subject to much tuning.  My recommendation would be to examine the data base and look for tuning opportunities.

Make a Google search for the exact phrase, "Should I Normalize My Database" and read the very interesting and thoughtful arguments on the many sides of this question.  You may want to consider a redesign after you've read that! Some things that can be done immediately without restructuring include fairly simple steps.

Add a LIMIT clause to every query where you do not absolutely require a table scan.

Add indexes on every column used in WHERE, ORDER, GROUP, JOIN, HAVING and any other clause that is relational in nature.

Use EXPLAIN SELECT on every complex query.  I define complex as touching more than one table.

Never use SELECT * but instead SELECT only the columns you need.

Avoid the use of BLOB or TEXT data types; move these large data elements out of the data base and into the file system.  Store a URL in the data base instead of storing the bloated data.

Thoughts on a data base table to hold your pre-packaged web pages...

1. If your hosting company is doing things right, the GZIP can be done dynamically for each request.  And if they're not able to help you with this, consider getting another host.  This is not rocket science; it's a meets-minimum part of professional web hosting.

2. If you build and store a web page then serve the stored version, you lose something of the dynamic nature of a data base driven web site.  That's a lot to give up.

3. Compressing the web page output to store it in a data base is a lot of overhead that has to occur somewhere.  I'm not sure how you might trade that off against the savings that might or might not accrue.

So my conclusion would be to try 2A (dynamic GZIP first), then look at optimizing the markup and images.  If that gets your page loads down to an acceptable level, you're home free.  If not, look under the hood of the SQL engine and optimize the data base structure and query structure.

HTH, ~Ray
0
 

Author Comment

by:cybersi
ID: 39921243
Wow Ray that's an answer and a half!!!!  Going to take me along time to digest and understand.  I should let you now I'm not a developer just a simple end user who is trying to get our family web page working professionally.
0
 
LVL 109

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 39921281
Got it!  

My recommendation is to contact your host and ask them to verify that the server will comply with a GZIP DEFLATE request.  They should know what that is and they should be doing it already, but it's worth verifying.  Your second step would be to get Firefox, Firebug and YSlow.  You can Google those terms and find out where to get the downloads.  Installation is easy and you can get a wealth of information from YSlow.
0
 

Author Closing Comment

by:cybersi
ID: 39921285
Thanks Ray
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 39921423
Thanks for the points and thanks for using EE! ~Ray
0
 

Author Comment

by:cybersi
ID: 39923091
Hi Ray

Just to give you an update.  I spoke to the hosting company and they can only do it on a Linux system.  So I have to upgrade from 2003 to 2008 and then to linux.  This will also give me access to the .htaccess file which a can chnage the config setting to allow me to be more flexablible.

Thanks for putting me in the right direction.

Simon
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 39923557
Hey, Simon.  Thanks for the update.  I think you're headed in the right direction.  Good luck with it! ~Ray
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question