Advertisement: Over 100,000 Jobs Worldwide. Click here to find one for you.

MySQL FAQs
FAQs Categories
Client Server Commands
Database Structure
Table Types or Storage Engines
Indexes
SQL Statements
Table Joins
Funtions and Operators
Tricky Select Queries
Speed Up Queries
Data Back Up
General Questions
Errors


http://www.careermidway.com
 

How to create memory table with btree index?

Can you help me to explain, how to create Memory table with B-Tree Index in MySQL?

Answer No: 189

You can specify USING clause provided by MySQL at table creation time to ask for B-Tree Index on a particular column. The following example declares a B-Tree index on the username column:

CREATE TABLE users (
id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
username CHAR(15) NOT NULL,
pwd CHAR(15) NOT NULL,
INDEX USING BTREE (username),
PRIMARY KEY(id)
) Engine=MEMORY;

Related MySQL FAQs to the Above FAQ

When-should-we-use-memory-engine When should we use memory engine?

How-to-create-memory-table-with-hashed-index How to create memory table with hashed index?

About SiteAbout FAQsAffiliates and Sponsors
© 2007 - 2010  www.mysqlfaqs.net
All rights reserved. The site is owned and operated by Mr. Javed Bhatti - Pakistan.