Re: Problem with Temp Tables and Logging
Posted in 1995
>We do go through the log files quickly (about every 45 seconds). Is it possible >that the query starts, then the logs roll right around and the query, not being >completed, gets the boot? >It is only a select, but it does contain ORDER BY, and that phrase is causing >the query to take forever to run. It could be that the query creating the implicit temp table is spanning the LTXHWM percentage of the log space. In version 7.x, the LTXHWM configuration paramenter is set by default at 50 percent, meaning that any transaction that spans over 50 percent of the log space is considered a long transaction and will be rolled back. If you're going through logs that quickly, its appears that you could benefit from larger logs. In addition, if this query is run frequently, consider placing an index on the table that is composed of the same columns used in the ORDER BY statement. This may help the optimizer choose an index path and avoid the temp table all together. J. Dority