1 While storing the full date and using (interval) partitioning is generally better, a couple of thoughts on when separate year/month may be better:
- The incoming data may not include a full date, just a month and year. In which case the day is a guess; storing only the known values makes more sense to me
- Queries searching for a specific month/year are easy. e.g.:
where month = :mth and year = :yr
Though you could also do this using virtual columns.
2 You can do truncate partition with the current setup; it's not necessary to switch the partitioning method to do this.
Also bear in mind truncate commits, whereas delete doesn't. Switching to truncate means there's a brief period where other users see that partition as empty.
As this works with current data, there's a good chance truncate would cause problems.
Loading the data into a staging table then using exchange partition is both fast and avoids the empty table problem.