Sunday, February 22, 2009

MySQL Storage Engines

MySQL Storage Engines
Storage Engines: ISAM, Berkeley DB (BDB), InnoDB

Martin C. Brown
Friday, October 7, 2005 12:17:56 AM

ISAM

The ISAM storage engine was the original engine type available with versions of MySQL up until MySQL 3.23, when the MyISAM storage engine was introduced. ISAM has a number of different limitations that make it impractical as a database engine. These include the storage format, which is native to the platform (and therefore not portable between systems), a maximum table size of just 4GB and limited text searching facilities. Indexes are also more limited. Since MyISAM is supported on the same platforms as ISAM, and provides better compatibility, portability and performance.

ISAM is included for backwards compatibility, you certainly shouldn't use ISAM for new databases, use MyISAM instead.

Table 9. ISAM Summary

NameISAM
Introduced v1.0
Default installYes
Data limitationsLimited maximum database size (4GB)
Index limitationsMaximum 16 indexes per table, 16 parts per key
Transaction supportNo
Locking levelTable

Berkeley DB (BDB)

The Berkeley DB (or BDB) engine is based on the technology provided by the Berkeley DB storage system developed by SleepyCat software. BDB is a hash based storage mechanism, and the keys to the hash values are stored very efficiently. This makes the recovery of information--especially when accessed directly using a unique key incredibly quick, and by far the quickest of the available database types. Recovering full records is even quicker if you the data is short enough to be stored with the unique key (i.e., under 1024 bytes long). BDB is also one of only two types of storage engine that support transactions.

BDB is, however, limited in other ways. Although it uses page locking, locking only 8192 bytes of a table, rathter than the entire table, during an update this can cause problems if you are performing a large number of updates in the same page (for example, inserting many rows). There is unfortunately no way round this. Sequential data access--for example a large quantity of rows matching non-indexed data--can be a lot slower because the data needs to be scanned row by row.

Recovery of information with BDB tables can also be a problem. Data in BDB is stored in a combination of the key index, the data file and binary data logs. A loss of data in any of these sections, even just one of the data logs, can make the data in the database totally unrecoverable.

Where BDB shines therefore is in locations where you can access specific blocks of data by a unique key that does not frequently change. I've successfully used BDB tables in the past to store look up information for data like categories or option lists where the small size and unique key structure make it quick and easy to recover information that is not often changed from its initial definition.

Table 10. Berkeley DB (BDB) Summary

NameBDB
Introducedv3.23.34a
Default installNo
Data limitations None
Index limitationsMax 31 indexes per table, 16 columns per index;max key size 1024 bytes
Transaction supportYes
Locking level Page (8192 bytes)

InnoDB

The InnoDB Engine is provided by Innobase Oy and supports all of the database functionality (and more) of MyISAM engine and also adds full transaction capabilities (with full ACID (Atomicity, Consistency, Isolation, and Durability) compliance) and row level locking of data.

The key to the InnoDB system is a database, caching and indexing structure where both indexes and data are cached in memory as well as being stored on disk. This enables very fast recovery, and works even on very large data sets. By supporting row level locking, you can add data to an InnoDB table without the engine locking the table with each insert and this speeds up both the recovery and storage of information in the database.

As with MyISAM, there are few data types that cannot effectively be stored in an InnoDB database. In fact, there are no significant reasons why you shouldn't always use an InnoDB database. The management overhead for InnoDB is slightly more onerous, and getting the optimization right for the sizes of in-memory and on disk caches and database files can be complex at first. However, it also means that you get more flexibility over these values and once set, the performance benefits can easily outweigh the initial time spent. Alternatively, you can let MySQL manage this automatically for you.

If you are willing (and able) to configure the InnoDB settings for your server, then I would recommend that you spend the time to optimize your server configuration and then use the InnoDB engine as the default.

Table 11. InnoDB Summary

NameInnoDB
Introducedv3.23 (source only), v4.0 (source and binary)
Default installNo
Data limitationsNone
Index limitationsNone
Transaction supportYes (ACID compliant)
Locking level Row

Friday, February 6, 2009

Key Board Short Cuts for Mozilla FireFox (Cheat Sheet)

Key Board Short Cuts for Mozilla FireFox (Cheat Sheet)

Thursday, February 5, 2009

View 101 things that the Mozilla browser can do that IE cannot

101 things that the Mozilla browser can do that IE cannot


Related with
mozillabrowser.document javascript
javascript mozilla notepad
new yahoo mail blinking mozilla browser
how ie browser 101
"mozilla" "browser has no properties
media upload ie bugs wordpress cannot open browse window
document ie mozilla
downloads in mozilla when paused cannot continue later
y cant i open mozilla
mozillabrowser.document
disable tooltips mozilla
javascript open new window link resize mozilla
mozilla browser "open new window"
window.open() attributes in javascript (mozilla browser)
how open ie window in mozilla browser
window size varies in ie and mozilla
zip file ie cannot download bu mozilla can
mozilla browser has no properties
how to remove the underline in the link in mozilla & ie script?
mozillabrowser.document.style
"copy mozilla bookmarks"
mozilla can download zip files while ie cannot
"how to copy mozilla"
mozilla bookmarks to notepad?
mozilla block new window open
mozilla plugin custom event handler
mozilla keyboard in revers
bookmark a page with javascript in mozilla and ie browser
free download mozilla.jar
mozilla browser javascript open new window
open in new window via a submit in mozilla
mozilla cannot open links to images
javascript ie cannot capture key 64
ie + file + "new window" + event
javascript caret browsing disable mozilla
download mozilla.jar
sending a png file to browser causes the browser to display a window for saving the file
text blinking for mozilla browser
zoom text in javascript in mozilla
soap zoomtext
mozilla no keyboard zoom
site:scribd.com mozilla
"remove tooltips in mozilla"
file cannot be find ...windows popup when using mozilla browser
set minimum browser resize mozilla
system c32 keep popup when i open ie
how to upload ie favorites to mozilla
how to open multiple tabs in a single mozillabrowser
view cookies set on ur m/c
sidebar addpanel open in side panel is enabled by default
mozilla jar image inside zip
new window opens in ie and not in mozilla
how to copy bookmark from mozilla to notepad
javascript error "this.document has no properties"
javascript moving images
javascript window.sidebar "to open"
ie:cannot show animate cursor on web page
how to copy all links from bookmarks to notepad
how to draw on mozilla google
javascript code to open a new window in mozilla browser
steal this book page by page in notepad
mozilla can not open pictures
why css cant be uploaded on mozilla
"custom search engine" ie blocking popup scripts
mozilla jar protocol -xss -"cross-site"
how to open a uploaded image in mozilla browser
mozilla 1.2 page info dialog
output vary from ie to mozilla
when right click any tab & click open in new window error do u wish to debug
cannot save new window in mozilla
i cant c the popub blocked sign on ie
window.sidebar.addpanel third option
jar-protocol ie
this.document has no properties in mozilla
62 ie's open when a link is clicked
how i can create a brwosing window in javascript code with browser button from where i can select a different images which were available in my window
text blink by css in ie
bookmark script in mozilla and ie
keyboard shortcut in mozilla open default email provider
ie mozilla plugin view source
mozilla cannot open new window
control number of tabs which a user can open in mozilla browser
open mozilla search new window
saving mozilla bookmarks in notepad
how to copy all the bookmarks at once from mozilla to a text document
can i open an image without a browser
things cannot be done in mozilla
ie cannot display border
how can i get the properties of all opened tabs in a browser?
mozilla can logon but ie cannot
block selected images in mozilla
code to display image in mozillabrowser
mozilla cannot link with image
view javascript without downloading document
hidden things in about mozilla
windows xp cannot search mozilla email
how to copy mozilla bookmarks