Question

Pefomance Questions

Asked by: bhagatali

Hi All,

I am working on a data scrambling program. The intent of which is to scramble the confidential data in our database.

I am coding this program using COBOL with DB2/400 as my database. As of now the database size is between 200 - 300 GB. The number of distinct records that I have in a table is a minimum of 1.5 million records.

There are two types of fields that I have to work with:

1) Update all records in a table with a constant value.For example,all phone numbers in a table would be updated to 9999999999.
2) I have to read data from a field,apply a formula to convert that to a new value and then update that back into the table.

Any suggestions on how best I can handle these approaches with the least performance impact will be appreciated?

Some of the questions that I have are:

1) If i have to update 2 fields in the same table with a constant value, will it be faster to use the same UPDATE query to update both fields (or) do I write two different update queries for these fields?
2) Do I update the table in bulk or do I do it in blocks?
3) It would be best to commit at regular interval, right?
4) How best do I handle the second approach of reading data,converting and then updating. Do I do it one record at a time or do I save the values in an array/file and then update in bulk?

Thanks in advance for any suggestions.

Regards
Ali.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-10-22 at 18:44:03ID24836768
Tags

Performance

,

Data Scramble

,

DB2/400

,

COBOL

Topics

Programming for iSeries / AS400

,

DB2 Database

Participating Experts
5
Points
500
Comments
26

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. To commit, or not to commit. That is the question.
    I'm a very infrequent SQL user. No training, but I do have a copy of "SQL for Dummies", which I find perfectly matched to my degree of expertise. I'm writing a program that firstly has to read a large text file of input data and validate it. If the entire file is p...
  2. Record Selection Formula's and Distinct
    This is a fairly easy question. Can the distinct clause be used in the record selection formula ? If so what is the correct syntax ? Thanks.
  3. MS Excel Formulas - How to Commit the Results
    Hello, This is probably a very simple question and I am not even sure I am asking it correctly. I have a sheet that has 3 columns - Column A, Column B, & Column C. I am using a formula to Concatenate the text data in Column A with the text data in Column B and putting th...
  4. Intermitten commits - howto?
    Hi All, I would like to how can i do intermittent commits in pl/sql. Actually i have a table with about 10 million rows and i would like to do an update on all rows. An update on a single transaction takes a lot of time and i would like to do intermittent commits say after 1...
  5. For a purging process, I'm trying to create a procedure t…
    For a purging process, I'm trying to create a procedure that deletes and commits in a loop. There are over 7 million rows in the table. I've used some helpful tips in Experts Exchange but I'm getting the ORA-1001 invalid cursor. I'm running oracle 9.2.0.5. I want to dele...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: giltjrPosted on 2009-10-22 at 18:57:03ID: 25640829

Why not encrypt it?

 

by: momi_sabagPosted on 2009-10-23 at 00:05:23ID: 25641877

1) it is better to use a single update - it will save you time, io and log space consumption
2) it is better to update in blocks, updating in a bulk cause a very high impact on the log, and if your program will encounter an error, all work will be rolled back. using blocks you can restart your program if it fails. Consider locking the entire table before you begin in order to reduce overhead caused by many lock request
3) yes.
4) i think the best approach would be to create some user defined function that does the operation for you, and then just call it in the update. this way the data does not have to come back to your application at all - will save significant amount of time
update table
set column = my_func(column)

or,
you can save yourself all this trouble and buy a tool that does this,
for example, this is a link to an ibm certified tool that can do this, and it will ofer you more features for example, if you have foreign keys, it will maintain your data integrity
http://www.orbiumsoftware.com/products/data-masking-scrambling-jumbledb-express
you can download a free version in order to try it first

there are more tools in the market that have this functionality, but this is the cheapest one I know of, and it sounds like your needs are rather basic.
maybe the it will cost you more to code and test your cobol program than buying such a tool

 

by: BigSchmuhPosted on 2009-10-23 at 06:45:40ID: 25644338

When you have a full table to update, there is although another way : EXPORT/IMPORT

You export all columns of the table with modified columns (using a function as stated in the previous post).
You use the LOAD /REPLACE command to massively re-import the full table.

I think this offers 2 benefits :
-performance : Exporting does not require LOG files, Loading already can handle large number of rows and regular (#rows based) commit
-non fragmented table : Loading all table at once means no more rows can be fragmented

 

by: Gary_The_IT_ProPosted on 2009-10-23 at 10:31:49ID: 25646542

In general, here's the  formula to obtain the best speed and performance standpoint when updating a large percentage of  records in very large tables.

  1. Disable journaling on the tables to be updated. 
  2. Drop  indexes, views, triggers (you need to determine if it is safe to drop trigger programs, of course).  If triggers are used to maintain summary tables, for example, it is usually cheaper in terms of IO and runtime to place summarization logic into your conversion program, though of course this increased the coding effort required.   You have to decide what is the most important - minimizing runtime or simplifying the conversion programming required.  I've done large conversions where we had months of time to prepare for a conversion that had to happen in a very narrow window, and I've worked on conversions where the goal was to get the project done in the shortest calendar time 9including coding and testing), regardless of conversion runtime. 
  3. Rename source table, create an empty new table with the original name. 
  4. Set commitment control to *NONE (the only option if you stop journaling anyway) 
  5. Block read / Block write, preferably  from a native session, rather than remotely (STRSQL, CRTQMQRY, RUNSQLSTM, COBOL/RPG embedded SQL, or native COBOL/RPG I/O).  Block to 32K bytes:  OVRDBF FILE(tableName) FRCRATIO(*NONE) SEQONLY(*YES numberOfRecordsinBlock) where numberOfRecordsToBlock = INT(32,768/recordLength).  INT means to round down, not up.  Temporarily turn off FRCRATIO if it is set on the file, otherwise it will interfere with record blocking.  Apply same blocking command to both the source and target tables.  Blocking gets disabled, at least in RPG, if you issue UPDATE operations, hence the need to use two different tables, so you can stick to READ and WRITE operations. 
  6. Perform all of your updates to a given row in a single pass.   You only want to read and write to the file once, since waiting on I/O is by far the biggest component of runtime. 
  7. Minimize workload on the system when running your conversion, particularly disk arm utilization. 
  8. Rebuild any dropped indexes, views, triggers. 
  9. Restart journaling. 
One other benefit of this method is that since the source table is untouched, you may be able to get away without backing up first.

By the way, you may find that using a simple COBOL or RPG program to perform this kind of mass update can perform better than SQL, since you can easily code  a block-read table scan / block update using a file override, precisely control record blocking, and easily incorporate existing COBOL trigger program logic if required.

EXPORT/IMPORT is twice as expensive in terms of time and I/O, but is otherwise is the same basic process as what I describe above.  Unfortunately, on DB2/400, the import utility (CPYFRMIMPF) does NOT automatically halt journaling, switch to *NONE commit definition, nor drop and rebuild indexes and trigger programs, so you still have to handle all this yourself.
  • Read table / perform update / write to export file 
  • Read export file / Write table 
- Gary Patterson

Check out me EE profile: http://www.experts-exchange.com/M_4382324.html

 

by: bhagataliPosted on 2009-10-23 at 10:50:03ID: 25646683

Thank you all for the inputs. These are very good tips that I am getting.

I will leave this question open for a couple of days just in case anyone else wants to chip in.

 

by: tliottaPosted on 2009-10-23 at 11:18:15ID: 25646917

>  As of now the database size is between 200 - 300 GB. The number of distinct records that I have in a table is a minimum of 1.5 million records.

This makes it sound as if you're actually talking about a database with some number of tables. Are you updating /a/ table or are you updating a possibly unknown number of tables due to cascading relationships? Are these DDS native physical files or DML SQL tables?

Tom

 

by: bhagataliPosted on 2009-10-23 at 11:34:09ID: 25647051

I will be updating a set number of tables. The realtionship between tables have been idenitfied and I will have to run the update on all tables which have the field that I am scrambling.

Right now, the program is going to work with DB2 tables, but this program will have to be leveraged to work on physical files too.

 

by: Gary_The_IT_ProPosted on 2009-10-23 at 11:41:59ID: 25647129

On the AS/400, a physical file is a DB2 table, and vice-versa.  There are some relatively minor functional differences in capabilities and performance depending on the mechanism used to create the object (SQL vs. DDS or other "native" method).

Gary Patterson

 

by: BigSchmuhPosted on 2009-10-23 at 12:59:59ID: 25647961

I provided first a way to reload the full table.

Now I am wondering about just updating in place the rows : that should be faster in your case because:
-You can keep each column it's original size
-You can drop any index concerned by those columns and recreate them after the update

So, I will:
-Create FUNCTIONS to render those modifications
-Create a basic UPDATE loop to ensure regular bulk commit
==> That will be faster than anything else and won't require lots of additional space (LOGs only)

 

by: Gary_The_IT_ProPosted on 2009-10-23 at 14:58:00ID: 25649099

First a quick correction:  Optimum block size for disk I/O with newer RISC hardware is 128K, older CISC machines are 32K.

http://www-912.ibm.com/s_dir/slkbase.nsf/1ac66549a21402188625680b0002037e/d6738e1cd37e1f33862565c2007cef79?OpenDocument&Highlight=0,Block,Length

The method I described earlier will generally  be significantly faster in terms of I/O and runtime than an in-place updat, since opening a single file for both input and output under DB2/400 disables record blocking.

I did a rework on a data conversion for a distribution company  several years ago.  They had hired a programmer to come in and develop custom RPG programs to move data from their old warehouse system to a new system.  Due to production schedules, the conversion needed to fit into a ten hour window over conversion weekend.  Unfortunately, test runtimes were coming in much higher - over 40 hours for dozens of files and millions of records on a relatively small AS/400.

We applied the rules that I have listed above on the largest files, making almost no other changes.  I hardly had to touch the actual conversion program code at all, and the runtime, including index rebuilds, immediately dropped to between 3 and 4 hours.  Not bad for four hours of effort.

Why so drastic a difference?

The biggest difference is record blocking.  On DB2/400, an open data path (ODP) can block records only if a specific set of rules are met, and one of the rules is that the file be opened for Input, or Output, but not both.

Let's say we block to 128K (128*1024 = 131,072 bytes), and for convenience sake say each record is 131 bytes long, and there are a million records.  

This gives us a blocking factor of 1000 records.  When using blocked I/O (1,000,000 logical reads to one file, 1,000,000 logical writes to another), a program will make 2,000 physical I/O requests, since it will be retrieving and storing blocks of 1,000 records at a time.

When using non-blocked I/O, a program will need to make 2,000,000 I/O requests to process the same number of records.  This is very inefficient, especially since the larger blocked I/O requests only take a small additional amount of time over the small non-blocked requests.  This is because so much of the I/O time is spent waiting on queue for your turn to get I/O, for the disk arms to get into position, for the disk to spin, and all of the other components in the chain from IO request to response.  Once you are in position to read a chunk of data, it is more economical to go ahead and grab the data that trails behind it on disk, since you have already paid the big penalties.  The same economies happen on the write side of the transaction, especially if space for the initial size of the file is allocated ahead of time.  also, when you are performing blocked I/O ont eh read side, the DBMS and OS are better able to predict and anticipate your future data requests, and may be able to cache the data your program needs -further speeding up your I/O requests.

Stopping journaling saves the CPU, memory, and IO cost associated with logging each change out to disk.

Dropping indexes and views alleviates the system from having to do synchronous updates to those access paths as each record is changed or written.  The system can then do   bulk index rebuilds (which are much faster than doing them one record at a time on the fly, since the system can, among other things, take advantage of blocking of writes to the index) after the new file is created.

- Gary Patterson

 

by: BigSchmuhPosted on 2009-10-23 at 15:14:12ID: 25649205

What happen if you explicitly LOCK a table for an inplace UPDATE in DB2/400 ?

That should rocks !

 

by: Gary_The_IT_ProPosted on 2009-10-23 at 16:30:52ID: 25649771

Well, with a commit level of *NONE, you get an exclusively locked table that cannot be accessed by any other job on the system.

As far as I can recall, you still don't get to perform record blocking on updates, though.

In a conversion scenario, we are probably reading a static, unchanging table in a single scan while (hopefully) no other processes access that  table.  Then we are writing out a new table, again that is probably not going to be in use by other processes.

With zero contention on either table, and no competing locks, I don't know if allocating the table exclusively would make any difference at all.  Can't hurt, though, and it is a good mechanism to ensure that there are no accidental updates while the conversion runs.

I do think this that allocating (and later deallocating) the file is a good item to include in the list.  I'd allocate right before stopping journaling, and deallocate right after starting it back up again.

- Gary

 

by: BigSchmuhPosted on 2009-10-23 at 23:45:53ID: 25651097

The point is that you have NO allocation needed IF you keep all column datas their initial size.

I would;
-stop journaling
-drop columns concerned indexes
-exclusively lock each table
-loop an update committed every 100000 rows
-relock table if commit unlock it
-recreate indexes

 

by: tliottaPosted on 2009-10-24 at 18:37:27ID: 25655161

If you stop journaling, then there is no "committed every 100000 rows". Commitment control requires journaling.

Tom

 

by: BigSchmuhPosted on 2009-10-25 at 01:37:32ID: 25655998

I am not sure you can really "stop journaling", I though of redirecting to "nul" was one way to do it...thus requiring some commits

 

by: tliottaPosted on 2009-10-25 at 03:05:07ID: 25656176

@BigSchmuh:

You might be right, after I read back through to see a confirmation that these are "DB2 tables" and differentiated from "physical files" in the same sentence. I've never actually tried to cease journaling of actual tables in a SQL schema under i5/OS. SQL tables that are merely created in a 'library' aren't restricted and journaling can be stopped at any time.

But "redirecting to "nul"" is not appropriate under i5/OS. It's a different animal under the covers.

Tom

 

by: bhagataliPosted on 2009-10-26 at 14:09:58ID: 25666944

Hi Gary,

Thanks a ton for all this valuable inputs. You mentioned in your first post that I "Perform all of your updates to a given row in a single pass.   You only want to read and write to the file once, since waiting on I/O is by far the biggest component of runtime. ". Can you elaborate a little on this?

After the discussion that I have had with my IT team, we have narrowed down our scrambling fields. For most of the fields that we have idetntified, we are going to update them with a constant value in all records. For e.g., phone number fields in all tables will be updated to all 9's. For such fields, I am just planniing to use the source table as the target table. Because I dont intend to read from the source table, I am just going to go updating in blocks.

There is another kind of field which I need to read, manipulate and update. For those fields, I am going to create a new table (similar to what you have recommended). How would you recommend I update the fileds?

1) Should I read from the source table, copy the block onto an array, make the changes and then write into the target file. (or)
2) Should I read from the source table, write into the target table in blocks and then run an update on the target table.

Thanks for your time.

Regards
Ali

 

by: Gary_The_IT_ProPosted on 2009-10-27 at 10:05:54ID: 25674831

@BigSchmuh,

You know that we are talking about DB2 on AS/400 here, right?  It has some significant  differences from DB2 mainframe and DB2 LUW.  Journaling is either on for a given table, or it is off.  There is no such thing as redirection of journal data to alternate devices on DB2/400.  Journal data gets logged to a journal receiver (*JRNRCV) object, or journaling is off for a given table, period.

And to reiterate what Tom is saying, if journaling is off, then you can't use any commitment definition other than *NONE.

@Tom,

There is no problem starting and ending journaling for DB2/400 files in an SQL collection/schema.  Same rules apply as any other physical file: Stop anytime

@Ali,

Elaboration:  Reading data from disk is extremely time-consuming.  Writing to disk is extremely time consuming.  So much so that it is almost the only thing that counts when you are measuring runtime performance of batch programs (communication IO can be another significant cost, but that doesn't apply in this particular case).

If runtime is your principal concern, you want to develop batch programs that only read each input table once (and read them using a blocking factor that produces as close to a 128K block as possible without exceeding 128K), and only write each output table once (using the same blocking rules).  You never want to update an existing table if you have to touch every row, since you can't block UPDATE I/O.

On your "update with a constant" process:

  • If you want to minimize IO and hence, runtime, you HAVE to block read from one table and block write to another.  UPDATing the same table will force unblocked I/O, and increase runtime by a significant factor (depends on record length - the shorter the record, the worse relative performance will be, in general.  Test with a small subset (100K records, for example) to see if the runtime payback is worth the effort.
     
On your other process that apparently requires some sort of summarization (I assume that is why you need an array in the middle):
  • Using an UPDATE against your source table is liable to cost you significantly in runtime, since the IO can't be blocked. 
  • Depends on your goals and restrictions;  coding time and effort versus runtime. 
  • Read source, load  array, make changes, then write to target table probably gets you the least IO activity (unless the array is going to be so large it has to be paged in and out), but requires more complex coding, obviously.  Assuming you block read and block write, this is probably far faster than the other alternative.
     
  • Read source, write, and update gets you 4 IOs for each row.  The read and write passes can be blocked IO but the Update pass will be non-blocked and very expensive. 
You know, if you post real-world examples of the data you are working with and the changes that need to happen, we can give you much better advice.

- Gary Patterson

 

by: bhagataliPosted on 2009-10-27 at 11:10:15ID: 25675556

Thanks for taking the time to reply Gary. I will pick up one of my larger tables and do a POC for both approaches.

 

by: BigSchmuhPosted on 2009-10-28 at 01:11:38ID: 25680803

If you can turn off the journaling that easily, you can issue a single large UPDATE taking care of updating every concerned column by modified value of the exact same length.
An exclusive LOCK on the table before this UPDATE should lower down to a minimum the locking overhead.

 

by: Gary_The_IT_ProPosted on 2009-10-29 at 15:06:03ID: 25698726

Yes, you can just issue an SQL UPDATE.  

For that matter, you can also open the table up in the editor of your choice, and manually edit each record.  

The two techniques have one thing in common - neither one will get you the best performance.

If you re-read the original question, it is:  "How do I do this with the least performance impact?"  

Even with journaling disabled, and indexes deleted and recreated, an UPDATE is still going to get you unblocked I/O.  To update a million records with constant values only, you'll do 1,000,000 IOs.  If you do any WHERE logic or if your updates refer to another field, or if you do anything else that forces the optimizer to do an INPUT prior to the UPDATE, you will do 2 million IOs to get the job done.  

To get the best performance - which was the original question - you have to mimimize I/O.  That means doing a blocked read and a blocked write, since I don't know of any way to do a blocked update (using SQL or native I/O).  If there is a way to do a blocked update, I'd really like to see it, since that would be very handy on occasion.

Anyway, this means you need to to a blocked read from one table, and a blocked write to a different table, stop journaling, drop indexes, etc.  exclusively allocating both tables isn't a bad idea either, but generally conversions like this are done against idle tables anyway ( I suspect that we are converting production data to test data in this particular project, so contention probably isn't an issue.)

Depending on record size, you may be able to reduce to I/Os by a factor of 10, 100, or 1000 or more using this technique, and, all assuming you don't hit other system limitations, you'll improve runtime by a significant factor.

Now, if a simple UPDATE runs in an acceptable amount of time,  then there really is no point  in going further, but that was not the question.  

The question was "how do I do this with the least performance impact", and there is almost no circumstance that I can come up with where doing an SQL UPDATE is the lowest-cost method (exception possibly being extremely large record lengths, and even then it is likely  at best, a tie with the two-table method.)

- Gary Patterson

 

by: BigSchmuhPosted on 2009-10-29 at 15:26:22ID: 25698865

I have no experience of DB2/400 but a pretty large one on udb.

Is DB2/400 such a piece of crap that there are no lazy writer on it ? Or is the DB2/400 such a poorly optimized app that it does not group io to render those on a like-sequential approach ?

The best performance then should be to switch to a better os and dbms platform ! A 2U bi-nehalem 64GB Ram with DAS attached SSD for example will outperform anything on this 400 world for sure !

 

by: Gary_The_IT_ProPosted on 2009-10-29 at 16:43:38ID: 25699238

bhagatali,

BigSchmuh says: "I have no experience of DB2/400...".

Since he brings it up, I have over 20 years of DB2 on AS/400 experience.

- Gary Patterson

 

by: BigSchmuhPosted on 2009-10-29 at 17:29:57ID: 25699403

Can you keep your focus on the technical subject and let us know what is the problem with the db2/400 lazy writer ?
I would really like to trust your "best performance" solution...against the single UPDATE one...but i just don't understand what can avoid db2/400 to be efficient in massive writes like that.
Block writes just look like sequential access...and even normal raid hba can render that behaviour.

 

by: bhagataliPosted on 2009-11-13 at 10:42:34ID: 31644847

Thanks a lot for your inputs.

 

by: tliottaPosted on 2009-12-27 at 01:23:16ID: 26126697

Minor note...

> Is DB2/400 such a piece of crap that there are no lazy writer on it ?

It is essentially always on by default. You have to ask for it not to be used. Even then, transfer from memory to disk is only from memory to (hardware) cache. You choose how much write-cache you have when you choose which controllers you install. The caches generally have their own batteries separate from other system power. Power failures generally lose no cached data. (I've never seen it happen.)

Are other products such pieces of crap that you have to think about it? It's not a question that developers of DB2 on AS/400s ever need to deal with except in very rare circumstances when it needs to be disabled. (I've never seen a need.)

Tom

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...