From: [EMAIL PROTECTED]
> One fairly simple technique is to create a single table to contain only the
> key column(s) of the several partitioned tables; then use an insert and
> delete trigger on each of the main tables to maintain this table in tandem
> with them.

You still have to connect to one spot to do the insert, which brings in
locks and stuff.

Our cheat is the following.

                        insertQuery = connection.prepareStatement
                        ("INSERT INTO "+ memberTable
                        + " Values(?,"+
                        "(select ((((COALESCE(max(M.mr_id),0))/100)+1)*100) + "+
                        "max(D.db_id) from "+ memberTable +" as M, "+
                        databaseTable+ " as D)"+
                        ",?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");

Where the databaseTable has a single unique ID for each database (1-99) and
then the records get replicated around as needed.

You could do the same with a unique partition table for each partition.

-HJC

-
:::  When replying to the list, please use 'Reply-All' and make sure
:::  a copy goes to the list ([EMAIL PROTECTED]).
***  To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
***  For more information, check http://www.db2eug.uni.cc

Reply via email to