Innodb locking and Foreign Keys

Today I was working with application which uses Innodb and foreign keys and got into locking problems possibly due to foreign keys, so I did a little investigation on that matter. Interesting enough it looks like most people do not think about foreign keys overhead in terms of locking. The overhead about checking referenced table …

Continue reading

PostgreSQL Trigger Example

A trigger can be used to execute a function when an event (insert, or delete, or update) occurs in a table. Let us review how to create a trigger with an example. Synopsis

CREATE TRIGGER creates a new trigger. The trigger will be associated with the specified table and will execute the specified function function_name when certain …

Continue reading

[Note] MySQL Architecture and Concepts

MySQL’s Logical Architecture The topmost layer contains the services that aren’t unique to MySQL. They’re services most network-based client/server tools or servers need: connection handling, authentication, security, and so forth. The second layer is where things get interesting. Much of MySQL’s brains are here, including  the  code  for  query parsing,  analysis,  optimization,  caching,  and  all  …

Continue reading