Trigger Happy -
Getting around
MySQL Limitations
Phil Hildebrand
theplatform.com
Who says that can’t be done?
Maybe it can’t be done out of the box, but that’s
doesn’t necessarily mean it can’t be done …
Restrictions are blinders
Think out of the box
If it’s not challenging, why bother?
Triggers do come out of the box
Understand the challenge
Evaluate solutions
Look beyond test into production
Foreign keys on partitioned tables
Challenge: How do foreign keys work?
Foreign keys on partitioned tables
Challenge: How do foreign keys work?
Possible solutions?
Foreign keys on partitioned tables
Challenge: How do foreign keys work?
Possible solutions?
Foreign keys on partitioned tables
Challenge: How do foreign keys work?
Possible solutions?
What about production?
Unique indexes on partitioned
tables
What’s the challenge/problem?
Unique indexes on partitioned
tables
What’s the challenge/problem?
Possible solutions?
Unique indexes on partitioned
tables
What’s the challenge/problem?
Possible solutions?
Unique indexes on partitioned
tables
What’s the challenge/problem?
Possible solutions?
What about production?
Conditional unique constraints
Columns from Separate Tables Must Be Unique
Conditional unique constraints
Columns from Separate Tables Must Be Unique
Possible solutions?
Conditional unique constraints
Columns from Separate Tables Must Be Unique
Possible solutions?
Conditional unique constraints
Columns from Separate Tables Must Be Unique
Possible solutions?
What about production?
Moving Innodb Tables/Partitions
Ideas?
Moving Innodb Tables/Partitions
Ideas?
Moving Innodb Tables/Partitions
Ideas?
Moving Innodb Tables/Partitions
Ideas?
Moving Innodb Tables/Partitions
Ideas?
5 Minute Challenge
Global Index on a partitioned table ?
Foreign Keys to different engines?
New partition on insert ?
Parallel partition queries ?
Any questions?
Phil Hildebrand
phil.hildebrand@theplatform.com
opendba.blogspot.com