Let's Party!

Multiple columns

A table can be partitioned on more than column. That is, the way data is splitted can depend on differents columns.
Example:


<!DOCTYPE letsparty-config PUBLIC "-//LetsParty//LetsParty Configuration DTD 0.1//EN"
	 "http://letsparty.sourceforge.net/letsparty-configuration-0.1.dtd">
<letsparty-config>
  <real-conn>
    <url>jdbc:mysql://192.168.0.252:3306/LETSPARTY_TEST?autoReconnect=yes</url>
    <driver>com.mysql.jdbc.Driver</driver>
  </real-conn> 
  <table name="MYTAB_A" separator="_">
   <column name="ID1" interval-class="net.sf.letsparty.cfg.IntInterval">
  	<partition name="1">
  		<interval from="1" to="2" />
  	</partition>
  	<partition name="2">
  		<interval from="3" to="4" />
  	</partition>
  	<partition name="3">
  		<interval from="5" to="6" />
  	</partition>
   </column>
   <column name="ID2" interval-class="net.sf.letsparty.cfg.DateInterval">
	<partition name="2000">
  		<interval from="2000-01-01" to="2000-12-31" />
  	</partition>
  	<partition name="2001">
		<interval from="2001-01-01" to="2001-12-31" />
  	</partition>
   </column>
</letsparty-config>

In this case the partitions would be: MYTAB_A_1_2000, MYTAB_A_2_2000, MYTAB_A_3_2000, MYTAB_A_4_2000, MYTAB_A_1_2001, MYTAB_A_2_2001, MYTAB_A_3_2001, MYTAB_A_4_2001.

Some examples of rows that could be in the partitions:

MYTAB_A_1_2000
ID1 ID2 A_VALUE
1 2000-04-20 'Some data'
1 2000-05-12 'Some data 2'
2 2000-02-21 'Some data 2'
MYTAB_A_2_2000
ID1 ID2 A_VALUE
3 2000-02-01 'Some data'
4 2000-01-12 'Some data 2'
4 2000-08-21 'Some data 2'
MYTAB_A_3_2000
ID1 ID2 A_VALUE
5 2000-12-01 'Some data'
5 2000-10-02 'Some data 2'
6 2000-08-24 'Some data 2'
MYTAB_A_1_2001
ID1 ID2 A_VALUE
1 2001-12-01 'Some data'
2 2001-11-02 'Some data 2'
2 2001-11-19 'Some data 2'
MYTAB_A_2_2001
ID1 ID2 A_VALUE
3 2001-11-21 'Some data'
4 2001-04-08 'Some data 2'
4 2001-10-12 'Some data 2'
MYTAB_A_3_2001
ID1 ID2 A_VALUE
5 2001-11-13 'Some data'
5 2001-06-15 'Some data 2'
6 2001-07-13 'Some data 2'