Re: Performance Problem with Temp Table
Posted in 1994
> >Why such a pronounced difference in the performace of that query with >the "no log" added to the creation of the temp table? Is this >platform/system specific or is it common across all platforms/systems? > It has an effect on all systems, but it's much more pronounced in systems (I suspect yours is one) that has the physical log, the logical log, the source table and the destination table on the same physicial disk drive (even in different dbspaces). This has the unfortunate effect of "Washing-Machining" the disk. That is, seeking between widely separated cylinders often as the data is being written. Disk seeks are much more expensive than writes to contiguous space. If you want really high performance, put each of them on their own disk (expensive, unless you have a really large database). Otherwise, use logging only when needed. I don't understand why "WITH NO LOG" is not the default for temporary tables anyway, since they're never going to be there after a system stop anyway. ----------------------------------------------------------------- Jim Burks jburks@promus.com The Promus Companies Memphis, Tennessee, USA