472,958 Members | 2,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

Insert Performance on a Partitioned DB

I have a test database that I have built in a 3 partition (and 3 node)
environment. I have defined all the tables so they have the same
partition key. The tables (7 of them) form a hierarchical
arrangement. The data is all bogus, so I using the generate_unique
function to come up with a partitioning key for each record. This is
all done through a stored proc with will insert about 90 records in
the heirarchy.

The behavior that I am seeing is when the proc generates a
partitioning key that will put (all) the data on the local partition
it runs quickly, (.2 second or less), when the partitioning key
resolves to another partition it takes 2 to 4 seconds. This is true
no matter which node I actually run the stored procedure on.

I know that there will be internodal communication and inserting the
data on one of those nodes will be slower than on the local partition,
but this seems excessive. Has anyone dealt with this kind of problem?
I have exhausted my ideas of where to look to address this
communication issue.

Any ideas?

thanks

Jack
Nov 12 '05 #1
8 3619
"Jack" <jb****@marketron.com> wrote in message
news:13**************************@posting.google.c om...
I have a test database that I have built in a 3 partition (and 3 node)
environment. I have defined all the tables so they have the same
partition key. The tables (7 of them) form a hierarchical
arrangement. The data is all bogus, so I using the generate_unique
function to come up with a partitioning key for each record. This is
all done through a stored proc with will insert about 90 records in
the heirarchy.

The behavior that I am seeing is when the proc generates a
partitioning key that will put (all) the data on the local partition
it runs quickly, (.2 second or less), when the partitioning key
resolves to another partition it takes 2 to 4 seconds. This is true
no matter which node I actually run the stored procedure on.

I know that there will be internodal communication and inserting the
data on one of those nodes will be slower than on the local partition,
but this seems excessive. Has anyone dealt with this kind of problem?
I have exhausted my ideas of where to look to address this
communication issue.

Any ideas?

thanks

Jack


Can you explain exactly how many inserts are being done and what the syntax
is?

Can you explain your network configuration (the hardware used to link the
nodes together)?
Nov 12 '05 #2
Insert into a partitioned db will run slower than a single-partition db.
But not so slow like your testing result. I will not suggest define the
partitioning key on the function.
BTW, if you only want to improve INSERT performance, you can check with
Buffered Insert and local bypass feature.

Jack wrote:
I have a test database that I have built in a 3 partition (and 3 node)
environment. I have defined all the tables so they have the same
partition key. The tables (7 of them) form a hierarchical
arrangement. The data is all bogus, so I using the generate_unique
function to come up with a partitioning key for each record. This is
all done through a stored proc with will insert about 90 records in
the heirarchy.

The behavior that I am seeing is when the proc generates a
partitioning key that will put (all) the data on the local partition
it runs quickly, (.2 second or less), when the partitioning key
resolves to another partition it takes 2 to 4 seconds. This is true
no matter which node I actually run the stored procedure on.

I know that there will be internodal communication and inserting the
data on one of those nodes will be slower than on the local partition,
but this seems excessive. Has anyone dealt with this kind of problem?
I have exhausted my ideas of where to look to address this
communication issue.

Any ideas?

thanks

Jack


Nov 12 '05 #3
I've looked at ISERT BUF, it appears to have no impact on my tests.
Local Bypass is really not an option because the partition key is
created at run time in the Stored Procedure.

The database is seven tables in a hiearchical arrangement. All tables
are partitioned on the key of the parent table (T1). The structure
looks something like this:

T1
--------------
T2 T3
-----------
T4 T5
-----
T6 T7
The SP just does a series of inserts with do loops

The keys for each table is generated in the SP via a Generate_Unique
function.

The 3 nodes are dual IA32 boxes running RH AS 2.1. They are connected
via a public 100 mb network and a private 1gb network. The private
network is defined as the switching network for DB2. This private
network is only for DB2 cluster. If have verified by FTP tests that
the networks are running at expected speeds.

I believe the issue tied to the performance of communication between
the nodes.
thanks

Jack

Fan Ruo Xin <fa*****@sbcglobal.net> wrote in message news:<3F***************@sbcglobal.net>...
Insert into a partitioned db will run slower than a single-partition db.
But not so slow like your testing result. I will not suggest define the
partitioning key on the function.
BTW, if you only want to improve INSERT performance, you can check with
Buffered Insert and local bypass feature.

Jack wrote:
I have a test database that I have built in a 3 partition (and 3 node)
environment. I have defined all the tables so they have the same
partition key. The tables (7 of them) form a hierarchical
arrangement. The data is all bogus, so I using the generate_unique
function to come up with a partitioning key for each record. This is
all done through a stored proc with will insert about 90 records in
the heirarchy.

The behavior that I am seeing is when the proc generates a
partitioning key that will put (all) the data on the local partition
it runs quickly, (.2 second or less), when the partitioning key
resolves to another partition it takes 2 to 4 seconds. This is true
no matter which node I actually run the stored procedure on.

I know that there will be internodal communication and inserting the
data on one of those nodes will be slower than on the local partition,
but this seems excessive. Has anyone dealt with this kind of problem?
I have exhausted my ideas of where to look to address this
communication issue.

Any ideas?

thanks

Jack

Nov 12 '05 #4
Hi.

jb****@marketron.com (Jack) wrote in message news:<13**************************@posting.google. com>...
I've looked at ISERT BUF, it appears to have no impact on my tests.
Local Bypass is really not an option because the partition key is
created at run time in the Stored Procedure.


There's a statement in HTML document that came with DB2 V7.1:
Local bypass is enabled automatically whenever possible, but you can
increase its use by routing transactions to the partition containing
the data for that transactions.

Does this statement imply that there's another secret DB2 configuration
which is described in somewhere deep in the manual and only known to
someone who's read through each and every manual page :), or does it
simply mean that local bypass is only available when the target partition
happens to reside in the same node as the controlling partition?
Any ideas?

Thanks in advance.
Nov 12 '05 #5
y0******@yahoo.co.jp (YONETANI Tomokazu) wrote in message news:<b2**************************@posting.google. com>...
Hi.

jb****@marketron.com (Jack) wrote in message news:<13**************************@posting.google. com>...
I've looked at ISERT BUF, it appears to have no impact on my tests.
Local Bypass is really not an option because the partition key is
created at run time in the Stored Procedure.


There's a statement in HTML document that came with DB2 V7.1:
Local bypass is enabled automatically whenever possible, but you can
increase its use by routing transactions to the partition containing
the data for that transactions.

Does this statement imply that there's another secret DB2 configuration
which is described in somewhere deep in the manual and only known to
someone who's read through each and every manual page :), or does it
simply mean that local bypass is only available when the target partition
happens to reside in the same node as the controlling partition?
Any ideas?


Sorry, the previous message was unclear about what "statement" I was
referring to: my question was how "Local bypass is enabled automatically
whenever possible", in other words, how or whether it's possible to
exploit local bypass feature without intervention of user code(by calling
sqlugrpn() API to determine the appropriate node, for example).
Nov 12 '05 #6
Jack,

One thought, are you commiting each insert, or all as a single transaction?

- I'm thinking the commit overhead between partitions could
be causing the large difference?

Paul.
Nov 12 '05 #7
YONETANI Tomokazu wrote:
y0******@yahoo.co.jp (YONETANI Tomokazu) wrote in message news:<b2**************************@posting.google. com>...
Hi.

jb****@marketron.com (Jack) wrote in message news:<13**************************@posting.google. com>...
I've looked at ISERT BUF, it appears to have no impact on my tests.
Local Bypass is really not an option because the partition key is
created at run time in the Stored Procedure.


There's a statement in HTML document that came with DB2 V7.1:
Local bypass is enabled automatically whenever possible, but you can
increase its use by routing transactions to the partition containing
the data for that transactions.

Does this statement imply that there's another secret DB2 configuration
which is described in somewhere deep in the manual and only known to
someone who's read through each and every manual page :), or does it
simply mean that local bypass is only available when the target partition
happens to reside in the same node as the controlling partition?
Any ideas?


Sorry, the previous message was unclear about what "statement" I was
referring to: my question was how "Local bypass is enabled automatically
whenever possible", in other words, how or whether it's possible to
exploit local bypass feature without intervention of user code(by calling
sqlugrpn() API to determine the appropriate node, for example).


Local Bypass is very helpful for those short transaction applications.
It is in user code, which should figure out which target partition the data should send to. When the data you need to
insert will be on the coordinator partition, then you don't need to do any configuration. If not, you can use db2 API
help you to find out.
For the OLTP system, another thing is also very important - don't make one db partition to become the workload
bottleneck.
Regards,
FRX

Nov 12 '05 #8

This doesn't really surprise me in the least bit. Do a couple of
searches for inserts and partitions and read a couple of my posts. In
our env we went from 4000 rows/sec Insert in a non partitioned table to
400 rows/sec when partitioned.

The only way around this is utilize buffered inserts which was mentioned
or build your application smart enough to load directly to each
partition inside of your application.

Check this link out for more information on buffered inserts.

m.com/dmdd/library/techarticle/0204pooloth/0204pooloth.html?Open&ca=daw-
ad-dr

Spencer
--
Posted via http://dbforums.com
Nov 12 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Eric | last post by:
I'm trying to insert data for a real-time application that demands less than 3 second receipt-to-commit time, has a relatively large (500,000 records/hr) data rate, and requires access times on the...
1
by: SM | last post by:
/* problem: Trying to get partitioned views to "prune" unneeded partitions from select statements against the partitioned view. There are 5 partitioned tables. Each with a check constraint...
1
by: Jay | last post by:
Hi I have a huge table with over 100million records and on regular basis ineed to delete nearly a million records and insert a million records. Currently I delete indexes before going through the...
7
by: jafastinger | last post by:
In our shop we have a 28,000,000 row insert that gets reloaded every night. I am not looking to change this process. I would like to know why in UDB Vs 7.2 we were getting an insert rate of 3300...
1
by: simon | last post by:
Hi Hopefully someone could point me in the right direction on this one. INFRASTRUCTURE DB2 v7 on MVS OS390 SCENARIO We are currently loading large volumes of data (eg 20MM rows) per day...
10
by: shsandeep | last post by:
The ETL application loaded around 3000 rows in 14 seconds in a Development database while it took 2 hours to load in a UAT database. UAT db is partitioned. Dev db is not partitioned. the...
2
by: eavery | last post by:
Does anyone know of any documentation on the performance of partition merge/split? Does the merge or split of a partition cause any locking on the partitioned table? If you were merging or...
0
by: eavery | last post by:
Does anyone know of any documentation on the performance of partition merge/split? Does the merge or split of a partition cause any locking on the partitioned table? If you were merging or...
2
by: eeriehunk | last post by:
Hi All, Is it possible to create a partitioned index on a table which is not partitioned? If so what is such a partition called and please explain? I have done some research on partitions and index...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.