Bad Ideas in Database Partitioning (Episode #1)
Warning, the following is a technical post that may make your eyes glaze over ... OK, if you are still here, this is a short one about something I recently saw in an Oracle database. First of all, a bit about partitioning. In some databases, you can partition a table in a variety of ways depending on why you want to partition your data. For example, you may want to partition it based on date ranges if you will be deleting older data or if you will generally be accessing data from the same time periods. This way, the database "knows" that it can safely ignore the other partitions outside of the date range you are looking for. This can result in the remaining data being searched much faster than if the whole table needed to be examined. Another way you can partition a table in Oracle is called hash partitioning. In this type of partitioning, the field in question is "hashed" or calculated into a new value that may not uniquely identify that value. For example, a...