6.90 SDO_NET.LOGICAL_PARTITION
Format
SDO_NET.LOGICAL_PARTITION( network IN VARCHAR2, partition_table_name IN VARCHAR2, max_num_nodes IN NUMBER, log_loc IN VARCHAR2, log_file IN VARCHAR2, open_mode IN VARCHAR2 DEFAULT 'A', link_level IN NUMBER DEFAULT 1);
or
SDO_NET.LOGICAL_PARTITION( network IN VARCHAR2, partition_table_name IN VARCHAR2, max_num_nodes IN NUMBER, log_loc IN VARCHAR2, log_file IN VARCHAR2, open_mode IN VARCHAR2 DEFAULT 'A', link_level IN NUMBER DEFAULT 1, part_size_tolerance IN NUMBER);
Description
Partitions a logical network, and stores the information in the partition table.
Note:
If the logical network is a power law (scale-free) network, do not use this procedure to partition it, but instead use the SDO_NET.LOGICAL_POWERLAW_PARTITION procedure.
Parameters
- network
-
Network name.
- partition_table_name
-
Name of the partition table, which is created by this procedure. (If an existing table with the specified name already exists, it is updated with partition information for the specified link level.) The partition table is described in Partition Table.
- max_num_nodes
-
Maximum number of nodes to include in each partition. For example, if you specify 5000 and if the network contains 50,000 nodes, each partition will have 5000 or fewer nodes, and the total number of partitions will be 10 or higher.
- log_loc
-
Directory object that identifies the path for the log file. To create a directory object, use the SQL*Plus command CREATE DIRECTORY.
- log_file
-
Log file containing information about operations on the logical network, including any possible errors or problems.
- open_mode
-
A one-character code indicating the mode in which to open the log file:
W
for write over (that is, delete any existing log file at the specified location and name, and create a new file), orA
(the default) for append (that is, append information to the existing specified log file). If you specifyA
and the log file does not exist, a new log file is created. - link_level
-
Network link level on which to perform the partitioning (default = 1). The link level reflects the priority level for the link, and is used for network analysis, so that links with higher priority levels can be considered first in computing a path.
- part_size_tolerance
-
Allowed tolerance in partition size expressed as a decimal fraction of
max_num_nodes
. Must be from 0 to 1. This parameter allows the partitioning procedure to create partitions with sizes larger than the one specified bymax_num_nodes
, thereby providing the flexibility to generate partitions with reduced inter-connectivity. For example, ifmax_num_nodes
is 5000 andpart_size_tolerance
is 0.1, a partition can include up to 5500 (5000+500 because 500 is 0.1*5000) nodes.
Usage Notes
The format with the part_size_tolerance
parameter enables you to partition logical networks with a primary focus on reducing the inter-connectivity among partitions while keeping the edge-cut small.
After you use this procedure to create the partitions, consider using the SDO_NET.GENERATE_PARTITION_BLOBS procedure, to enable better performance for many network analysis operations, especially with large networks.
Examples
The following example creates partitions for link level 1 in the MY_LOGICAL_NET
network, and creates the MY_LOGICAL_PART_TAB table. The maximum number of nodes to be placed in any partition is 5000. Information about the operation is added (open_mode => 'a'
) to the my_logical_part.log
file located in the location associated with the directory object named LOG_DIR
.
EXECUTE SDO_NET.LOGICAL_PARTITION(network => 'MY_LOGICAL_NET', - partition_table_name => 'my_logical_part_tab',- max_num_nodes => 5000,- log_loc => 'LOG_DIR', log_file=> 'my_logical_part.log',- link_level => 1, open_mode => 'a');
The following example creates partitions for link level 1 in the MY_LOGICAL_NET
network, and creates the MY_LOGICAL_PART_TAB table. The maximum number of nodes to be placed in any partition is 5500 because of the combination of the max_num_nodes
and part_size_tolerance
values (5000 + 0.1*5000 = 5500). Information about the operation is written (open_mode => 'w'
) to the my_logical_part.log
file located in the location associated with the directory object named LOG_DIR
, replacing any existing file with that name in that location.
EXECUTE SDO_NET.LOGICAL_PARTITION(network => 'MY_LOGICAL_NET', - partition_table_name => 'my_logical_part_tab',- max_num_nodes => 5000,- log_loc => 'LOG_DIR', log_file=> 'my_logical_part.log',- link_level => 1, open_mode => 'w', part_size_tolerance => 0.1);
Parent topic: SDO_NET Package Subprograms