by Nicolas Ruflin,
Sunday, June 7, 2009
In MySQL there is command "procedure analyse". It can be used to find out if you're using the right types in a table. As an example you can call:
SELECT * FROM user procedure analyse()
It will output the types you use, min-max value and min-max length and some more information. This could give you some advices which file types you should check.
More detailed informations you'll find in the MySQL Performance Blog.
Read more ...
by Nicolas Ruflin,
Wednesday, May 6, 2009
Almost for every webpage it's essential to improve the loading speed because this is one important part of the user experience. A lot of people today have broadband so loading big images or JavaScript files seems to be less a problem. But keep in mind that still all around the world people are surfing with 56KBit/s and nowadays more and more people are accessing the internet over there mobile phone with EDGE or 3G.
There exist some nice tools to get a report about you're webpage speed and what you could optimize.
This two tools are very similar. Yahoo also offers a very extensive list of "Best Practices for Speeding Up Your Web Site". There are a lot of small improvements that are also worth to implement on small webpages. But for some it's necessary to change the server configuration or to work with subdomains.
Read more ...
by Nicolas Ruflin,
Monday, April 6, 2009
It's important to also use coding guidelines in your SQL queries you write for example inside your PHP Code. Most MySQL SELECT queries are cached and since MySQL 5.1.17 also prepared statements are cache (with some exceptions).
For SQL query caching to work it's important that a query is exactly the same (Byte by Byte) as the one before. As an example the following three queries are all different for the query cache even if they return exactly the same result:
SELECT * FROM tbl_name
Select * From tbl_name
SELECT * FROM tbl_name
In the last example we have some more spaces. So be careful when you write your SQL queries.
Read more ...
by Nicolas Ruflin,
Thursday, May 28, 2009
I wrote my own Zend Translate Adapter. Today, I updated to 1.8.2. Although most of it worked straightforwardly, I had to make some minor modifications.
However, one thing was confusing: When file caching was enabled, my translation adapter no longer worked.
I tried to detect what had been changed by comparing my adapter to the current translation adapters. If you compare the _loadTranslationData of version 1.7 and 1.8, you will see the following difference:
$this->_translate[$locale] = $data + $this->_translate[$locale];
In version 1.8, a return value was added and the variable name was changed.
$this->_data[$locale] = $data + $this->_data[$locale];
return $this->_data;
It seems that it does not make any difference that they changed the name to _data instead of _translation, because both names work. When you use version 1.8, it is important to add the return command in your own Translation Adapter. Otherwise, the translation cache is empty.
Read more ...
by Nicolas Ruflin,
Sunday, October 4, 2009
Google offers the possiblity to link some JavaScript libraries like jQuery directly over Google CDN. But what is the advantage of loading it directly from then loading it from the own server? There are at least 3 advantages:
- Saving bandwith
- Allows you to download script in parallel
- Chance that the file is already in the cache is higher. Also other sides use this file.
Read more ...