Focal Point
efficiency

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4301018331

November 03, 2004, 01:17 PM
Stan
efficiency
The two of us in our firm who do the most FOCUS programming have a question of database design.

Does a join slow down processing time and does the size of the tables when doing a join slow the process at all...For example,

If I do a join between two tables that each have 10 million records, will this be slower than if I have one larger table with the 10 million records in it. My assumption has always been that the join would slow the processing, but another in the department disagrees and I'm not proud and am willing to admit I'm wrong if someone knows for sure.
November 03, 2004, 01:25 PM
Leah
It's been my experience that if the join is on key fields and the selection criteria is efficient then no slow down. In other instances it's been better to get the data from one table, hold it, get the data from the other table, hold it and then join the hold files on some common key. We use WebFOCUS (currently 4.3.6 production) against a DB2 V7.x database.


Leah C
November 03, 2004, 02:09 PM
Carol Dobson
What kind of database?

Thanks!
November 03, 2004, 02:57 PM
GCohen
If the database is a Focus file, then the join will not slow it down too much, because in a Focus file the first time a value is joined, the location of the joined to data is recorded, and thereafter its just a direct access.
Another 'but' is the size of the joined-to file.
If there are only a few values, then these probably stay in memory and there is no degradation.
When all values are put into one record, that record gets bigger and more i/o has to occur to access the record. But, sequential i/o is fast.
So, each situation has to be decided on its own merits.
November 03, 2004, 04:24 PM
Stan
The question was more of theory than actual situation as we are designing a few oracle tables and attempting to make it as efficient as possible so that the user will not be waiting. In general it would be a one to one join on Oracle 9i tables with about 10 million rows each, but we were more or less trying to decide amongst ourselves whether we would be better served to bring the two tables together 'datamart' style or to leave them separate. It is a debate we have had frequently of late because our DBAs have been heading in a direction that has us doing multiple joins more frequently.

Our assumption is that the join would take advantage of key fields.

Thanks to all for the input as it just helps us to discuss our theory all the better.