Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 644
  • Last Modified:

DB2 Load spend same time for small and big table

We are using db2 load to import data to a new database. We follow IBM Db2 Load guide and create all tables and indexes and start db2 load.
After 2h30 it imports just 15Gb (original database = 60Gb).
Looking the db2diag.log we can see how much time db2 load spend for each table.
For a small table (just 1 row) it spends 3 seconds. For a big table it spends 1 minute to import 1 million rows.

Anyone could help us with this thing???

Thanks in advance.

Emerson
0
tobar
Asked:
tobar
1 Solution
 
granbajoCommented:
Emerson,

  In reality, DB2 has to do certain things for each table no matter how bif or small it is... like opening the input file, read the data, load the table, release and close the file, so there is going to be a certain overhead there!

  In my experience, I found that it is quicker to load 1 big table than many small tables with the same amount of data.

  One thing that it might be worth checking, is the data local or are you having to get it from a network drive?  3 seconds seems a bit much for a table with one row.  Are there any dependencies?
0
 
tobarAuthor Commented:
I agree with you about the process (open, read load....), but in this case all of files are located on databae server and there is no dependencies.
Another detail is for each table imported DB2 writes 24 lines on db2diag.log. May be this process retards the import?

Regards
0
 
giltjrCommented:
Logging on an initial load will cause performance issues.  Not sure about the platform you are running on, but I know on z/OS when you do an initial load of a table you can have it not log.

 If you have to have it log, then make sure that the log is on a different physical drive or array, that is reduce I/O contention as much as possible.

You should also make sure that the input file is on a different physical drive or arrary.
0
 
ghp7000Commented:
you must specify what you mean by load or import-DB2 can do both. If you are importing large tables you are using the slowest method possible-large tables must be loaded using the load command, not the import command.
So please specify which utility you are using in your command ---LOAD or IMPORT?
Could you also specify platform/version and post a sampe of the db2diag.log entry please
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now