[Info-Ingres] Automatic partitioninng and unique keyed tables
Karl & Betty Schendel
schendel at kbcomputer.com
Mon Apr 16 09:13:21 CDT 2007
At 2:54 PM +0100 4/16/07, martin.bowes at ctsu.ox.ac.uk wrote:
>Hi Everyone,
>
>I'm running Ingres2006 +p12125 on a64.lnx
>
>Why is it that I cannot put an automatic partition on a unique keyed
>table?
Ooh! Ooh! I know! :)
>
>As I understand it, the automatic partition is just there to scatter the
>data randomly amongst the partitions. So to retrieve data it must go and
>look in each partition. Surely uniqueness would actually help not hinder
>that task?
That is precisely why one can't use AUTOMATIC and unique together:
DMF would have to probe all partitions for each insert to verify
the key uniqueness. It's actually harder than probing each partition
for the key when doing a lookup or k-join; QEF would have to drive
it somehow, doing X-locking probes to verify uniqueness, and then
one real insert into the proper partition (whichever that is).
The restriction doesn't just apply to AUTOMATIC. The rule is that
the partitioning has to be the same as the keying (or a subset of it,
in the case of RANGE or LIST); this allows us to ensure that rows
potentially containing that key must necessarily be in some
one known partition, avoiding the need to probe upon insert.
Karl
More information about the Info-Ingres
mailing list