December 19th, 2006 by Kyle

We've all had problems with slow queries, which can lead to sluggish applications and dissatisfied users. You've looked at your code and just can't figure out what's causing the problem. Have you looked at the effectiveness of your MySQL queries? Here's an easy way to analyze your queries to make sure they are being executed efficiently.
Here's a very simplistic example. Let's start out by creating a table of NFL teams.
MySQL:
-
CREATE TABLE `nflteams` (
-
`nflteam_id` SMALLINT(2) UNSIGNED NOT NULL DEFAULT '0',
-
`nflteam_city` VARCHAR(50) DEFAULT NULL,
-
`nflteam_name` VARCHAR(50) DEFAULT NULL,
-
`nflteam_abbv` VARCHAR(3) DEFAULT NULL,
-
`nflteam_icon` VARCHAR(20) NOT NULL DEFAULT ''
-
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
So a sample record would look like this:
MySQL:
-
INSERT INTO `nflteams` VALUES (14, 'Pittsburgh', 'Steelers', 'PIT', 'pit.gif');
We're going to start out with a simple query. Let's try:
MySQL:
-
SELECT nflteam_name FROM nflteams
-
WHERE nflteam_id = '14';
Our results:

Simple enough, right? Now the question is...is this query as efficient as it could be?
MySQL's EXPLAIN syntax shows how queries are being executed. Is the query correctly using indexes...is it utilizing indexes at all?
Let's try running EXPLAIN on the previous query:
MySQL:
-
EXPLAIN SELECT nflteam_name FROM nflteams
-
WHERE nflteam_id = '14';
The result of the EXPLAIN query is below:

So, what does this tell us?
Posted in MySQL | No Comments »
December 15th, 2006 by Kyle

In my first part of the Google Adsense introduction I talked about ad placement, ad blending and the importance of understanding the Adsense program policies. I just want to stress it one more time...make sure you play by the Adsense rules. If you try to push the envelope, you may make a decent amount of money in the short term, but in the long run you're just hurting yourself. If you violate the Google Adsense TOS, you're account will eventually get banned. So just play it safe and the profits will come. Be patient, monitor your advertising campaign and optimize it accordingly.
Ok, let's continue where we left off. You've chosen your ad format, your ad color scheme and you've integrated the ads into you website. Now you can just sit back and watch the money come rolling it. WRONG! It would be nice if it we're that simple, but it's not. Adsense tracking is very important, you must monitor your ads and make adjustments to those that aren't performing well. Luckily for us Adsense makes it easy to monitor ad performance via Channels. There are two types of reporting channels, URL and Custom.
URL channels allow you to track ad performance across a whole site, a specific page and even a specific directory. You can enable URL channels without modifying the actual Adsense code.
Posted in Adsense | No Comments »
December 14th, 2006 by Kyle

Please note, these are not my websites or tools, just some of my favorite SEO and webmaster tools that I use on a regular basis. I'll be posting more in the future
- Strongest subpages tool :: finds the top 30 strongest subpages from your domain and show which sites are linking to them
- Backlink Watch :: It will show you "anchor" text, pagerank, total outbound links on that page, and nofollow flag for each of your inbound link available.
- Keyword Density :: Analyzes your meta tags and keywords within your webpage suggests the keywords you should be using
- "Dig" Pagerank :: A cool little tool that will check your websites pagerank in 700+ datacenter
- Keyword Tracker : Keyword and backlink tracker. Show's daily, weekly and monthly fluctuation of your keywords. Also features custom charts and backlink tracker (free, requires a login)
- Pagestrength Tool :: Check your Page Strength, which looks at a variety of factors...Age of domain, backlinks, domain name visibity, etc
Posted in SEO | No Comments »
December 14th, 2006 by Kyle

Please keep in mind that this is only based on personal experience and each sites success will vary depending on the content, placement, integration, traffic, etc. This is a very basic overview geared towards first time "Adsensers".
Before you even think about getting Adsense up and running on your site, I highly recommend reading over the Google Adsense Program Policies. Be sure to not only read them, but understand them because you don't want to risk having your account banned.
Some of the most important (and basic) policies to remember are:
- DO NOT click your own ads.
- DO NOT alter the Adsense code in any way.
- DO NOT encourage users to click on your ads. The only text that can be used to label your ads are "Sponsored Links" or "Advertisements"
- DO NOT try to inflate your page impressions.
- Up to 3 ads may be displayed per page
- Adsense can only be placed on "content" pages. DO NOT place ads on registration pages, user profile pages, etc.
- You may have one, and only one, Adsense account
Ok, now that you've read over the policies it's time to start setting up Adsense for your website.
Choosing the right format
From my experience these are the Adsense formats that have performed best for me:
- 336 x 280 large rectangle
- 300 X 250 medium rectangle
- 468 X 15 horizontal ad links
Posted in Adsense | 1 Comment »
November 18th, 2006 by Kyle

I thought I would throw a little site together for myself. You won't find anything fancy here. No fancy web layout, no "bells and whistles", just a simple Wordpress layout. This is "my page" where I can practice (and share) my coding techniques, share family news and work on some long overdue projects.
Over time, I will be posting some PHP script samples and snippets to help you (and me) sharpen your skills. Most scripts will be sports or financial-related, but you never know. I've also begun to focus more on MySQL database normalization and optimization. After scouring other developers work, I've come to the conclusion that most do not know what a "good" and efficient database is. I'll clue you in on some tricks that can speed up your application...a lot.
I'll also be blogging about Adsense, Search engine optimization and other interesting subjects targeted towards webmaster and online entrepreneurs.
I started working on my family tree, which is something I've always wanted to do, but never got around to it. Feel free to take a look.
Posted in Random | 1 Comment »