Posts Tagged ‘Optimizing’

Mysql-Partition Your Tables

Thursday, July 24th, 2008

Often you have a table in which only a few columns are accessed frequently. On a blog, for example, one might display entry titles in many places (e.g., a list of recent posts) but only ever display teasers or the full post bodies once on a given page. Horizontal vertical partitioning helps:
CREATE TABLE posts (
id int UNSIGNED NOT NULL AUTO_INCREMENT,
author_id int UNSIGNED NOT NULL,
title varchar(128),
created timestamp NOT NULL,
PRIMARY KEY(id)
);

CREATE TABLE posts_data (
post_id int UNSIGNED NOT NULL,
teaser text,
body text,
PRIMARY KEY(post_id)
);

The above represents a situation where one is optimizing for reading. Frequently accessed data is kept in one table while infrequently accessed data is kept in another. Since the data is now partitioned the infrequently access data takes up less memory. You can also optimize for writing: frequently changed data can be kept in one table, while infrequently changed data can be kept in another. This allows more efficient caching since MySQL no longer needs to expire the cache for data which probably hasn’t changed.

What do you do in a situation where there’s an old, story the client feels is unfair and maybe even untrue, but it ranks for the client’s name and then you hit a home run for the client and they get coverage in the New York Times, Wall Street Journal, USA Today, Newsweek, Time Magazine and this pesky story still ranks for their name. What do you do?

Tuesday, July 15th, 2008

The reason that old story ranks so well for the client name is because of links. One of the first things you do is to engage in a link building campaign that attracts links to other positive representations of that brand name. If an organization is holistically optimizing their content and leveraging their digital assets as well as keyword messaging across all digital communications, and then promoting and getting links to that content, cumulatively it will have the desired effect.

If the other pickups are permanent, i.e. not temporary and not behind a login, then the company can work to get links to the other positive representations of their brand to increase the rankings of those stories and push down any negative results.

Top Position on Google

Monday, July 14th, 2008

How would you like to be 1 on Google search results for keywords you want? What would that do for your business? And imagine if you don’t have to pay for it! This is biggest opportunity in 2008 for webmasters who have been doing Search Engine Optimizing (SEO), advertising or marketing them selfs to get to Number One spot on Google and Yahoo.

Tips for optimizing your php code

Saturday, June 28th, 2008

# If a method can be static, declare it static. Speed improvement is by a factor of 4.

# echo is faster than print.

# Use echo’s multiple parameters instead of string concatenation.

# Set the maxvalue for your for-loops before and not in the loop.

# Unset your variables to free memory, especially large arrays.

# Avoid magic like __get, __set, __autoload

# require_once() is expensive

# Use full paths in includes and requires, less time spent on resolving the OS paths.

# If you need to find out the time when the script started executing, $_SERVER[’REQUEST_TIME’] is preferred to time()

# See if you can use strncasecmp, strpbrk and stripos instead of regex

# str_replace is faster than preg_replace, but strtr is faster than str_replace by a factor of 4

# If the function, such as string replacement function, accepts both arrays and single characters as arguments, and if your argument list is not too long, consider writing a few redundant replacement statements, passing one character at a time, instead of one line of code that accepts arrays as search and replace arguments.

# It’s better to use select statements than multi if, else if, statements.

# Error suppression with @ is very slow.

# Turn on apache’s mod_deflate

# Close your database connections when you’re done with them

# $row[’id’] is 7 times faster than $row[id]

# Error messages are expensive

# Do not use functions inside of for loop, such as for ($x=0; $x < count($array); $x) The count() function gets called each time.

# Incrementing a local variable in a method is the fastest. Nearly the same as calling a local variable in a function.

Ten Tips to the Top of Google

Saturday, June 28th, 2008

Having a Web site that gets found in Google isn’t hard to do, but it can be difficult to know where to begin. Here are ten tips to get you started.

1. Start out slowly. If possible, begin with a new site that has never been submitted to the search engines or directories. Choose an appropriate domain name, and start out by optimizing just the home page.

2. Learn basic HTML. Many search engine optimization techniques involve editing the behind the scenes HTML code. Your high rankings can depend on knowing which codes are necessary, and which aren’t.

3. Choose keywords wisely. The keywords you think might be perfect for your site may not be what people are actually searching for. To find the optimal keywords for your site, use tools such as WordTracker. Choose two or three highly targeted phrases for each page of your site. Never shoot for general keywords such as “travel” or “vacation.”

4. Write at least 200 - 250 words of visible text copy based on your chosen keywords. This is a crucial component to high rankings and a successful Web site. The search engines need to “read” keyword rich copy on your pages so they can successfully classify your site. Use each keyword phrase numerous times within your copy for best results.

5. Create a killer Title tag. HTML title tags are critical because they’re given a lot of weight with all of the search engines. You must put your keywords into this tag and not waste space with extra words. Do not use the Title tag to display your company name or to say “Home Page.” Think of it more as a “Title Keyword Tag” and create it accordingly. Add your company name to the end of this tag, if you must use it.

6. Create Meaty Meta tags. Meta tags can be valuable, but they are not a magic bullet. Create a Meta Description tag that uses your keywords and also describes your site. The information in this tag often appears under your Title in the search engine results pages.

The Meta Keyword tag isn’t quite as important as the Meta Description tag. Contrary to popular belief, what you place in the keyword tag will have very little bearing on what keywords your site is actually found under, and it’s not given any consideration whatsoever by Google. Use this tag, but do not obsess over.

7. Use extra “goodies” to boost rankings. Things like headlines, image alt tags, header tags <H1><H2>, etc.), links from other pages, keywords in file names, and keywords in hyperlinks can cumulatively boost search engine rankings. Use any or all of these where they make sense for your site.

8. Be careful when submitting to directories such as Yahoo and the Open Directory Project (DMOZ). Having directory listings are a key component to getting your site spidered and listed by Google. Making mistakes in the submission process could cost you dearly as directory listings are difficult to change later in the game. Therefore, it’s important to read Yahoo’s How to Suggest Your Site and How to add a site to the Open Directory before submitting.

9. Don’t expect quick results. Getting high rankings takes time; there’s no getting around that fact. Once your site is added to a search engine or directory, its ranking may start out low and then slowly work its way up the ladder. Some search engines measure “click-through popularity,” i.e., the more people that click on a particular site, the higher its ranking will go. Be patient and give your site time to mature.

10. Don’t constantly “tweak” your site for better results. It’s best not to make changes to your optimization for at least three-to-six months after submission. It often takes the engines at least that long to add your optimized pages to their databases. Submit it, and then forget about it for a while!

If you’ve followed these tips and still can’t find your site in the engines, the first place to “tweak” would be your page copy. If you added less than 250 words of visible text on your pages, this is probably your culprit. Also, double check your keyword density, and make sure that you only targeted two or three phrases per page. Eventually, you’ll see the fruits of your labor with many top ten rankings in Google and the rest of the search engines!

Updated SEO Checklist and the New SEO Forum

Thursday, June 26th, 2008

SEO checklist will assist you in optimizing your website for search engines. SEO checklist ensures you for all the possible steps taken for optimizing the webpages. Even though you implement each and every SEO practice into your webpages, sometimes you won’t be getting the intended results.. what should you be doing at this time?

Can your SEO checklist match the present practices… or is it an outdated one? There are many forums dedicated to SEO…I felt the need of another one to answer all your questions..
Do visit the new SEO forum frequently, and get updations about the latest trends in SEO.

Quick Search Engine Optimization for your images

Thursday, June 26th, 2008

Hope you’re already aware of Image Optimization. Designers out there may immediately think about the gif format and image compression, but this is clearly not anything related to reducing image size.

SEO and images are a bit old school I agree. Gone are the days when you had to insert keywords into your ALT tags and get a better rank than your competitor.
In fact, Google has changed it’s algorithm to filter out these “weeds” who’d do anything and everything from stuffing keywords to title spamming to get a better rank.

Though I agree that Search Engine Optimizing your images won’t give you any edge to directly push you over the top of the SERPs, I stick to the idea that they are not completely negligible.