• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 428
  • Last Modified:

Does anyone have any experience with quickcache?

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
cybersi
Asked:
cybersi
  • 10
  • 6
1 Solution
 
Ray PaseurCommented:
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
 
cybersiAuthor Commented:
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
 
cybersiAuthor Commented:
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
Ray PaseurCommented:
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
 
cybersiAuthor Commented:
its a hosted package with fasthosts.  I don't have access to the physical server.
0
 
cybersiAuthor Commented:
heres yet another link I have found which explains a bit better -good old google
0
 
cybersiAuthor Commented:
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
 
cybersiAuthor Commented:
I'm guessing 6
0
 
Ray PaseurCommented:
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
 
cybersiAuthor Commented:
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
 
Ray PaseurCommented:
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
 
cybersiAuthor Commented:
Thanks Ray
0
 
Ray PaseurCommented:
Thanks for the points and thanks for using EE! ~Ray
0
 
cybersiAuthor Commented:
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
 
Ray PaseurCommented:
Hey, Simon.  Thanks for the update.  I think you're headed in the right direction.  Good luck with it! ~Ray
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 10
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now