Re: OPT_GOAL
Posted in 2003
On Tue, 20 May 2003 10:00:30 -0400, Greg Mitchell wrote: Setting OPT_GOAL to zero (or using FIRST_ROWS optimization in SET OPTIMIZATION or optimizer hints) is useful for internactive applications where records will be displayed a few at a time. It makes the app appear to be more responsive since the first screen (indeed the first several screens) full of data will be displayed much more quickly than under the default, ALL_ROWS, optimization. In this case total runtime of the complete query is not important especially as often the user is only interested in the first few rows anyway. Indeed this was implemented when we and another large customer requested such a feature at about the same time to fulfill actual user complaints about responsiveness for larger queries in interactive apps. Art S. Kagel > Does anyone have any comments on OPT_GOAL > > We've experimented with setting it to 0 and found it to be detrimental > to batch processing jobs. > > My understanding is that it will influence the optimizer to choose a > path that will return the first rows quickly but not necessarily ALL > rows quicker than if it had been left at the default of -1. > > What's it's application? Is anyone using it effectively as an ONCONFIG > parameter, or is everyone using it as an environment variable. > > TIA, > > Greg.