kvz.io

Mysql

  • Published on
    IDs are often numbers. Unfortunately there are only 10 digits to work with, so if you have a lot of records, IDs tend to get very lengthy. For computers that's OK. But human beings like their IDs as short as possible. So how can we **make IDs shorter**? Well, we could borrow characters from the alphabet as have them pose as additional numbers.... Alphabet to the rescue!
  • Published on
    Sometimes MySQL needs to work hard. I've been working on an import script that fires a lot of INSERTs. Normally our database server handles 1,000 inserts / sec. That wasn't enough. So I went looking for methods to improve the speed of MySQL inserts and was finally able to increase this number to 28,000 inserts per second. Checkout my late night benchmarking adventures.
  • Published on
    Code spends more time being [read than being written](https://www.codinghorror.com/blog/archives/000684.html). I think naturally this is true for queries as well. So it might help if we teach ourselves some guidelines as how to nicely format them. I've searched but at the time of writing, could not find a public Style Guide for SQL formatting. I'll try to keep this guide short and pragmatic, so that it has a chance of actually being read & stuck to : )