Posts Tagged ‘Use’

Mysql-Use multiple-row inserts

Thursday, July 24th, 2008

Use multiple-row INSERT statements to store many rows with one SQL statement.

Mysql-Use statement priorities

Thursday, July 24th, 2008

* Use INSERT LOW_PRIORITY when you want to give SELECT statements higher priority than your inserts.
* Use SELECT HIGH_PRIORITY to get retrievals that jump the queue. That is, the SELECT is executed even if there is another client waiting.

Search Engine Optimization-Use your keywords in the Page Description.

Tuesday, July 15th, 2008

The Page Description is a short blurb or summary of your web page found in the metadata. Google often uses the first 20-25 words of this description below your site name in search results. As with the Page Title, Google will bold the words that match the user’s search terms.

Use time() rather than date(’U')

Saturday, June 28th, 2008

When you want to get the current Unix timestamp, it is faster to use time() rather than date(’U'). To test this, I used the time() function 100,000 times, followed by date(’U') 100,000 times. My results are as follows:

date(’U'): 19.162 seconds
time(): 0.057 seconds
Time saved: 19.105 seconds; 99.7%

WordPress: Network Transfer Speeds in Use

Saturday, June 28th, 2008

To determine why the bandwidth of the connection is important to a high-traffic site, let’s look at the math.

Assume your site receives 100,000 hits in a day. For the purpose of this computation, we will say that one “hit” is a single data transfer, whether that is a single file or a whole page and its supporting files. Averaged out, 100,000 hits in a day equates to 1.16 hits every second.

Also assume the average hit generates 160KB of transferred data; HTML, images, CSS, downloaded files, etc. Every second, your site is transferring 190KB of data (160KB/hit * 1.16 hits/s). The total, 190KB/s, equals about 1.5Mb/s of sustained throughput. (Note that KB = Kilobytes and Mb = Megabits. Most network speeds are rated in bits per second, whereas file sizes are measured in bytes.) Many network providers cap the transfer rate of a site to about this level; some higher, some lower. However, only if each user visits in a nice succession will this steady rate be maintained.

Usually, more than one user at a time will access your site. Sometimes during the day, nobody might access your site at all. If 10 people hit the site simultaneously per second, and that hit rate is sustained over a lengthy period — not uncommon for a high-traffic site — then you would need a 15Mb/s connection just to keep up with the simultaneous connections.

If your network adapters maximum theoretical speed is only 10Mb/s, your demand has already exceeded your capacity. WordPress had nothing to do with it.

It is not necessary to receive 100,000 hits to cause this problem. Sustaining this rate of connectivity for a mere hour generates only 36,000 hits. If visitors concentrate their access to a certain time of day (or an automated comment spam script attempts to access your system multiple concurrent times while posting comments) then you could be left with many dropped requests.

A 100Mb/s connection could handle up to 70 simultaneous connections at the same rate of download, but it is not likely that your network provider would offer the bandwidth that could fully use this speed without paying a premium. This is generally not something you can get with current shared hosting plans.

Use White Space

Thursday, June 26th, 2008

Be sure to make your content scannable. Few website visitors actually read blog posts; most web visitors simply scan a blog entry to determine its relevance or point. With that in mind, the blog posts should be displayed in short paragraphs. Overly long posts should be segmented into concise paragraphs or broken into bulleted lists to make scanning easier. Avoid the urge to “clutter” the post.

SEO : Use Title and ALT Attributes

Thursday, June 26th, 2008

More often then not, web addresses (URL’s) do not contain the topic of the page. For example, the URL www.myspace.com says nothing about being a place to make friends. Where a site like www.placetomakefriends.com would tell Google right away that the site being pointed to is about making friends. So to be more specific about where we are pointing to in our links we add a title attribute and include our keywords.

Using the Title Attribute is an direct method of telling the search engines about the relevance of the link. It’s also a W3C standard for making your page accessible to disabled people. In other words, blind folks can navigate through your website using a special browser that reads Title and ALT attributes. The syntax is:

<a href=”http://www.top10seotips.com/seo_software.htm” title=”SEO Software”>SEO Software</a>

The ALT Attribute is used for the same reasons as the Title Attribute, but is specifically for describing an image to the search engine and to the visually disabled. Here’s how you would use ALT in an IMG tag:

<img src=”http://top10seotips.com/img/image01.jpg” alt=”Top 10 SEO Tips”>

SEO : Use Headings

Thursday, June 26th, 2008

In college and some high schools, essays are written using a standard guideline created by the Modern Language Association (MLA). These guidelines included how to write you cover page, title, paragraphs, how to cite references, etc. On the Web, we follow the W3C’s guidelines as well as commonly accepted “best practices” for organizing a web page.

Headings play an important role in organizing information, so be sure to include at least H1-H3 when assembling your page. Using cascading style Sheets (CSS), I was able to make my h1 at the top of this page more appealing. Here’s a piece of code you can pop into your heading:

<style type=”text/css”>

h1 font-size: 18px;

h2 font-size: 16px;

h3 font-size: 14px;

</style>

Since a page full of headings would look just plain silly, my SEO tip would be to fill in the blank space with paragraphs, ordered and unordered lists, images, and other content. Try to get at least 400+ words on each page.

Use your keywords in the anchor text of links

Thursday, June 19th, 2008

Keyword in links have more importance than simple text.

Use your primary and secondary keywords in the anchor text of links when linking to other blog posts or to other pages on your main site.

Link keywords where they naturally appear in the body text, but again, don’t overdo it, or you’ll end up with spammy looking pages.

Use your secondary keywords in the body of your post

Thursday, June 19th, 2008

If you want to get listed for secondary keywords use them infrequently in the body of your post and pepper your blog titles or links with them appropriately.

Don’t overdo this or your posts will end up sounding unnatural and spammy to readers.