Migration From Oracle To MySQL - An NPR Case Study Presentation
Migration From Oracle To MySQL - An NPR Case Study Presentation
npr.org
Overview
Background
Database Architecture
SQL Differences
Concurrency Issues
Encoding Gotchas
Background
Syndication
Redundancy
Scalability
Load balancing
Separation of concerns
Better security
Database Architecture
Content
Mgmt System
Main
RO slave
Main
Web Servers
Read and updated
only by our website
InnoDB
Low resource contention
Updated
Mainby a nightly script
Small tables or log tables
Read-only
RO slave
by our Content
Short Transactions
Management System
Need fast full text queries
AMG
STATIONS
PUBLIC
(replacing Oracle Text)
MyISAM
InnoDB
InnoDB
Large tables
Isolation
Updatedbyfrom
bya our
main
Content
website
Management System
Updated
quarterly
script
Read-only
Transaction
byOriented
our
Read-only
from
ourwebservers
website
Horizontally
Resource
Contention
scalable
Some
Scripts
log type
information written
Backup
Highly
Normalized
Low
resource
contention
RO slave
No transactions
MySQL sorts null to the top, Oracle sorts null to the bottom
Use order by colName desc for sorting asc with nulls at
bottom
For updating many rows at once, get the total number of unique IDs
you need first:
.
.
. . ) SELECT
. FROM (SELECT
Converting Functions
Converting Dates
Adding or subtracting
Update Differences
Collation
Concurrency Issues
Deadlocks
Slow Queries
MySQL configuration
transaction_isolation = READ-COMMITTED
MySQL Administrator
innotop
http://code.google.com/p/innotop
In mysql, use
show engine innodb status\G;
Query Profiling
Concurrency Solution
Encoding Gotchas
Migration Tool
Lack
of
documentation
for
the
LUA
script
Continuing Issues
Questions?
Joanne Garlow
http://www.npr.org/blogs/inside