Navigation

Categories

Random Stuff

Search

  • RSS Feed
  • Valid XHTML
  • Valid CSS

Kyle's Weather

  • Linthicum, MD
  • Scattered Clouds
  • Temperature: 68°F
  • Wind: NE at 13 mph gusting to 17 mph
  • Humidity: 45.9%
  • Clouds: Scattered Clouds

My Visitors

  • 1 Now Online
  • 12 Max Online
  • 19241 Total Visitors

Are your queries optimized?

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:
  1. CREATE TABLE `nflteams` (
  2. `nflteam_id` SMALLINT(2) UNSIGNED NOT NULL DEFAULT '0',
  3. `nflteam_city` VARCHAR(50) DEFAULT NULL,
  4. `nflteam_name` VARCHAR(50) DEFAULT NULL,
  5. `nflteam_abbv` VARCHAR(3) DEFAULT NULL,
  6. `nflteam_icon` VARCHAR(20) NOT NULL DEFAULT ''
  7. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

So a sample record would look like this:

MySQL:
  1. INSERT INTO `nflteams` VALUES (14, 'Pittsburgh', 'Steelers', 'PIT', 'pit.gif');

We're going to start out with a simple query. Let's try:

MySQL:
  1. SELECT nflteam_name FROM nflteams
  2. WHERE nflteam_id = '14';

Our results:

MySQL query

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:
  1. EXPLAIN SELECT nflteam_name FROM nflteams
  2. WHERE nflteam_id = '14';

The result of the EXPLAIN query is below:
MySQL Explain

So, what does this tell us?

read more

Posted in MySQL | No Comments »

Intro to Adsense, Utilizing Channels

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.
read more

Posted in Adsense | No Comments »

My favorite SEO / webmaster tools

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 »

Introduction to Adsense :: Part I

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

read more

Posted in Adsense | 1 Comment »