Archive for category databases

Do I need a primary key and should it be called id?

While working with databases – especially Mysql – most people seem to ask the same question over and over again when it comes to Primary Keys. Here’s my typical answer to the question(s) above (and more).

Tags: ,

Emptying mysql tables

There are actually two ways to wipe a mysql table either using delete or using truncate – which is better and why?

Tags: ,

Mysql: (date) functions and indexes

Mysql is usually pretty fast by default, but to keep performance to the max sometimes requires knowledge on how mysql works and how to write queries that does their job most efficiently. Today we ran across a simple example which illustrates that mysql’s ability to use an index depends on the way you write the [...]

Tags: ,

Mysql insider

To write efficient Mysql-powered applications a little insight in how Mysql works is needed. One often overlooked example of this is Mysqls silent column changes features, which may cause your tables to look different than you specified.

Tags: