Atikh's DBA blog
  • Home
  • Oracle
  • MySQL
  • MongoDB
  • PostgreSQL
  • Snowflake
  • About Me
  • Contact Us

MySQL Storage Engines (Part 1)

 Atikh Shaikh     InnoDB, ISAM and MyISM, mysql, storage engines in mysql     No comments   

Below are the few Storage engines discussed and remaining will be discussed in next part
ISAM
-Original storage engine. was only available till 3.23
-Depreciated in 4.1 and completely removed in 5.0
-It was replaced by MyISAM.
-ISAM table can be easily converted to MyISAM table by using alter table command only
i.e. alter table <table_name> type=MYISM;
   alter table <table_name> engine=MYISM;
-Each ISAM table is stored on disk in form of 3 individual files
1. Table definition <table_name>.frm
2. Table data <table_name>.isd
3. Index file <table_name>.ism
Properties
Compressed and fixed length keys
Fixed and dynamic record length
16 indexes per table with 16 key per key
Data values stored in machine format i.e. fast but machine o/s dependent
MyISAM
-Default storage engine from mysql 3.23 onward
-Each MyISAM table is stored on disk in form of 3 individual files
1.Table definition <table_name>.frm
2.Table data <table_name>.myd
3. Index file <table_name>.myi
-explicit use of MyISAM storage engine
CREATE TABLE TEST (i INT) ENGINE=MYISAM;

-Supports below features
True VARCHAR datatype, a VARCHAR column starts with its length stored in two bytes
Tables with VARCHAR may have fixed or dynamic record length
VARCHAR and CHAR columns may be up to 64KB
Hashed computed index can be used for applying UNIQUE constraints
HEAP
HEAP storage engine create table whose contents are stored only in memory
before 4.1, memory tables were called HEAP tables
HEAP is synonym for MEMORY
Syntax
CREATE TABLE TEST (i INT) ENGINE=HEAP;


Memory tables are stored in memory and uses hash index which makes it fast and useful for creating temporary tables
but when server shuts down all data get flushed but table definition will remain intact as it gets stored on disk in the .frm file
MERGE
Introduced from 3.23.25, also know as MRG_MYISAM
A MERGE table is collection of identical MYISAM tables that can be used as one.
when MERGE table is created it create two files on disk
<table_name.frm>–table definition
<table_name.mrg>–names of identical tables
DROP TABLE command only drops MERGE specification is dropped not underlying tables
INNODB
This provides MySQL with transaction safe(ACID) data storage engine with commit,rollback and crash recovery capabilities
INNODB does record locking at row level and also provides an Oracle-Style consistent non locking reads in select statement
supports FOREGIN KEY constraints
it maintains own buffer pool for caching data and indexes in main memory
It stores its data in tablespace which may consist of several files or raw disk partitions
InnoDB tables can be of any size
InnoDB is being used at numerous large database sites requiring high performance
Syntax
CREATE TABLE TEST (i INT) ENGINE=InnoDB;

go to part 2
  • Share This:  
  •  Facebook
  •  Twitter
  •  Instagram
  •  Pin
  •  linkedin
  •  reddit
Email ThisBlogThis!Share to XShare to Facebook

Related Posts:

  • MySQL Storage Engines (Part 1) Below are the few Storage engines discussed and remaining will be discussed in next part ISAM -Original storage engine. was only available till 3… Read More
Newer Post Older Post Home

0 comments:

Post a Comment

Author

Atikh Shaikh
View my complete profile

Categories

  • MongoDB (18)
  • Oracle 12c (30)
  • Oracle12cR2 New Feature (3)
  • PostgreSQL (20)
  • RMAN (10)
  • Snowflake (8)
  • mysql (23)
  • oracle (74)

Blog Archive

  • ▼  2018 (38)
    • ▼  November (25)
      • Introduction On MySQL
      • SQL Modes in MySQL
      • MySQL Version explained
      • MySQL Storage Engines (Part 1)
      • MySQL Storage Engines (Part 2)
      • Login to MySQL Database on Linux
      • Error Code: 1419. You do not have the SUPER privil...
      • Create MySQL database on Linux
      • Create New User in MySQL Database
      • MySQL Default database | MySQL System Database
      • Oracle ASM Basic Commands
      • Oracle Database Schema Refresh
      • Create User in Oracle Database Pre-12c and 12c
      • RMAN Disk backup and List or Report RMAN Backup
      • RMAN Backup of Single Datafile and List Backup
      • Difference Between User, Service account and Schem...
      • Create MySQL Database Backup | mysqldump mysqlbackup
      • Switching between ARCHIVELOG Mode and NOARCHIVELOG...
      • Introduction to MongoDB
      • Introduction to PostgreSQL
      • Installation of PostgreSQL 9.6 on Windows
      • Installation of MongoDB on Windows
      • Oracle DBA Scripts
      • Databases, Collections and Documents in MongoDB
      • CRUD (Create, Read, Update, Delete) Operations in ...
    • ►  December (13)
  • ►  2019 (33)
    • ►  January (15)
    • ►  February (6)
    • ►  March (2)
    • ►  April (5)
    • ►  May (5)
  • ►  2020 (5)
    • ►  April (1)
    • ►  May (2)
    • ►  July (2)
  • ►  2021 (8)
    • ►  June (3)
    • ►  July (3)
    • ►  August (1)
    • ►  December (1)
  • ►  2022 (33)
    • ►  May (3)
    • ►  June (10)
    • ►  July (3)
    • ►  August (4)
    • ►  September (8)
    • ►  October (3)
    • ►  November (2)
  • ►  2023 (14)
    • ►  February (1)
    • ►  April (5)
    • ►  May (2)
    • ►  June (1)
    • ►  September (1)
    • ►  October (1)
    • ►  December (3)
  • ►  2024 (5)
    • ►  January (2)
    • ►  March (3)
  • ►  2025 (6)
    • ►  March (1)
    • ►  April (3)
    • ►  May (2)

Popular Posts

  • ORA-29283: invalid file operation: unexpected "LFI" error (1509)[29437]
    I was trying to export the schema in my windows PC, it got stuck with below error    C:\Users\shaik\Videos\technodba exp>expdp userid...
  • Oracle Dataguard Broker Configuration (DGMGRL)
    Data Guard Broker is a command-line interface that makes managing primary and standby databases easy. DBA can use a single command to switch...
  • Oracle 23ai : The all new Hybrid Read-Only for pluggable databases (PDBs)
      The latest Oracle database version, Oracle 23ai, introduced a new open mode called Hybrid Read-Only for pluggable databases (PDBs). Local ...
  • PostgreSQL : How to get data directory location for PostgreSQL instance
    Sometimes, you start working on a PostgreSQL instance but forget about the data directory, here we will discuss different methods to know th...
  • ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES
    In previous articles, we have learned about user creation and grants  in MySQL in detail, but there are a few privileges called global priv...

Labels

oracle Oracle 12c mysql PostgreSQL MongoDB oracle 19c Oracle23c oracle19c Orale PDB-CDB oracle12c python AWS Oracle ASM Virtualbox pluggable database storage engine

Pages

  • Disclaimer
  • Privacy Policy

Follow TechnoDBA

Copyright © 2025 Atikh's DBA blog | Powered by Blogger