More Architecture Mistakes To Avoid, Database Design Mistakes To Avoid, Tuning
When I started working with Oracle, I helped to replace a Cobol system. For a while, the company systems ran half on Cobol, and half on Oracle. The Oracle 7 system was pretty slow then. After the cold backups had run overnight, it was not unusual in the morning to see a query against a 700K row table take about 30 seconds.
I was asked to write a C program that only interfaced with the Cobol flat files, and read Cobol transaction records. Each transaction was stored in multiple rows, and given repeating groups of records, could vary in size from a few rows, to dozens of rows. The files contained about 700K to 800K rows altogether. The program grabbed information out of the multiple lines, tallied the numbers up, and output one line of summary. Lots of IF statements, and loops. About 800 lines of code.
I expected this program to take at least 30 seconds, given that database queries to similar size tables took that long, and that there was so much logic and so many lines of code.
In fact, the program ran in about 5 seconds! I was really surprised.
But when you think of it, it should be obvious that Read the rest of this entry »
You must be logged in to post a comment.