Posts Tagged ‘Frequently’

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.

Mysql-Creating a Derived Data Column

Thursday, July 24th, 2008

Frequently we query our database for a value but then have to always do the same manipulation on it before we can use it. Well it can often be useful to do this “once” in the database and then store the manipulated value in a separate column of the database.

Here is a very simple example
INSERT INTO tbl_name (col1,col2) VALUES(15,col1*3.14159);

Where col2 is set to the value of col1*pi

You could also do more complex calculation/filtering/shortening in your code eg php,ASP etc

Mysql-Querying By Date

Thursday, July 24th, 2008

We are so frequently required to create date based queries, eg how many orders last week, last month, how many orders between two dates. It is necessary to avoid the trap of treating date as a number, instead convert the date into a handy unit such as days

# select all records from today
select * from tbl_orders where TO_DAYS(NOW()) = TO_DAYS(dtmdevdate);

# select all records from last three days
select * from tbl_orders where (TO_DAYS(NOW())-3) > TO_DAYS(orderdate);

MySQL provides a whole range of date functions become familiar with them here

Search engine optimization-Tech and formatting tips

Tuesday, July 15th, 2008

First, make sure your site, especially your homepage, is frequently updated. Google seems to like frequently changing websites, this might be why weblogs tend to score very well at Google.

Second, make sure to have a lot of incoming and outgoing links (especially to and from big, relevant, high-quality websites). If something can be a link, make it a link! By doing so, Google will rank you pages higher as others who are not that embedded. This link relevancy system is called Google Pagerank. You can check out your pagerank at pagerank.net. Pagerank works on a scale from 1 to 10. If you have a rank of 1 or 2, you’re likely to be way down the search results. If you have a higher rank, your site will appear at the top of the search results, even if there are a lot of competitors for your specific keywords or business.

Third, make sure your site is clean and correctly formatted, preferably in web standards / xhtml. Avoid certain technologies the Google robot doesn’t understand. Don’t use a frameset for your website. Robots may skip frames or only index the upper one (refering will be a mess anyway). Avoid javascript or Flash menus, only a.href links are followed by a robot. Additionally, all javascript and comments are skipped by search robots.

For the same reason, full-flash websites should be avoided if search accessibility is important (actually, if ANY accessibility is important). If you do feel the strong need to use Flash, all you can do is to make sure you have a keyword descriptive URL and page title.

Firefox:Smart Bookmark Folders

Friday, June 27th, 2008

These dynamic folders give you easy access to your favorite sites and can be placed in your Bookmarks menu or Bookmarks toolbar. We’ve included some for you as defaults, including one that shows you the sites you visit most frequently (create your own by saving your searches in the Library).

Update your blog frequently

Thursday, June 26th, 2008

Update your blog frequently using all the rules mentioned above and your blog will surely get top rankings in a short time.

5 Stress Reducing Computer Tips

Monday, June 23rd, 2008

For most entrepreneurs computers are an intrical part of our business. An entrepreneur can not afford for their computer to be inoperable even for a minute. Implement some of these quick and affordable computer tips to keep your computer healthy and making money for your business.

1  Double Internet Speed

Comcast recently doubled cable modem download speeds. Now you can surf the Internet and download files twice as fast. However, you need to power cycle your cable modem [unplug it for 30 seconds and reboot computer] for the new configuration to be automatically downloaded to your modem.

2  Connecting to Work from Home

Having trouble with your corporate VPN connection when working from home? Oftentimes this can be fixed with a simple firmware upgrade to your network router or a slight change in settings.

3  Sudden Lost Connection

Has your Internet connection suddenly stopped working? Frequently computer users with software based firewalls suddenly find their Internet connection no longer available. Oftentimes when you download a software update, it can change your original configurations. As a quick test, disable the software firewall. If connectivity returns, it’s a misconfiguration issue.

4  Slow E mail and Internet Browsing

Has your computer been working wonderfully, but suddenly e mail or Internet browsing is painfully slow? It could be your cable connection went out. And although the connection has returned, your computer and the cable modem may be having difficulty communicating. Try power cycling your modem.

5  Eliminate Popups

Google offers a free popup blocker with its toolbar. Download the toolbar at www.toolbar.google.com. System requirements: Microsoft Windows 95/98/ME/NT/2000/XP, Microsoft Internet Explorer 5.0 or later. The popup blocker requires Internet Explorer 5.5 or later.

Update frequently

Thursday, June 19th, 2008

There’s no better food for search engine spiders than fresh content.

Post and update your blog frequently using all the rules outlined above and there’s no reason why your blog will not get you top rankings in a short period of time.

Cover Topics that Need Attention

Thursday, June 19th, 2008

In every niche, there are certain topics and questions that are frequently asked or pondered, but rarely have definitive answers. While this recommendation applies to nearly every content-based site, it’s particularly easy to leverage with a blog. If everyone in the online Nascar forums is wondering about the components and cost of an average Nascar vehicle - give it to them. If the online stock trading industry is rife with questions about the best performing stocks after a terrorist threat, your path is clear. Spend the time and effort to research, document and deliver and you’re virtually guaranteed link-worthy content that will attract new visitors and subscribers.

Safely Editing The Registry

Wednesday, June 18th, 2008

Windows XP has a vast number of configuration dialogs, but some adjustments can be performed only by directly editing the Registry. Frequently, tips involving Registry tweaks include stern warnings to back up the Registry before making any change. The Windows XP Backup applet can back up the Registry along with other elements of the System State, but the resulting data file can occupy hundreds of megabytes. You’re better off saving a system restore point each time you’re about to edit the Registry. Better still, you can use Regedit to back up only the Registry keys that will be changed.

Click on Start | Run and enter Regedit to launch the Registry editor. To back up an individual key you plan to edit, navigate to the key and right-click on it. Choose Export from the menu, and save the key to a REG file. Open the REG file in Notepad and insert a few comment lines that describe the source and purpose of the tweak. (To create a comment line, simply put a semicolon at the start of the line.)

Now go ahead and make all the changes to Registry keys and values specified by the tip you’re applying. Any time you add a new key or value, make a note of it with another comment line in the REG file. When you’re done, save the REG file and close Notepad.

If later you want to undo this Registry tweak, just double-click on the REG file and confirm that you want to add it to the Registry. This will restore any deleted keys or values and will restore the original data for any values whose data was changed. Note that this will not remove new keys or values that were added; that’s why you need to make comments about such changes.

Right-click on the REG file and choose Edit, which will open it in Notepad. Check for comments about keys or values that were added, and if you find any, use Regedit to delete them. You can delete the REG file itself once you’ve completed this process