Re: Force index usage
Posted in 1997
Richard Stanford wrote: > > > In article <5mhoc2$g0c@news.informix.com>, Amitabh B Sinha > > <amitabh@informix.com> writes > > >The next release of ODS and IUS will include a feature called > > >directives, which will be a non-ANSI compliant way of directing > > >the optimizer to do things it would not do in normal circumstances. > > >The current set of directives include the following: > > > forcing index selection, > > > forcing full-table scans, > > > forcing join method selection > > > forcing join order > > > etc. > > Am I the only one who is shuddering at this? > <<snip>> Informix "optimizer" does not always work (IMO). I have experience with a table of about 2.5 million recs, a simple SELECT on an indexed column, the 'optimizer' was not using the index (with OPTCOMPIND=2). But with a OPTCOMPIND=0 in the configuration file and re-initializing the server, it started using the index and as expected it is much faster. So, I had to change the configuration of the server to get it use the index. Since, it was one of the instances which is very less used, it wasn't a problem. Anyway, bottom line is, it will be great if there is an option to 'direct' the optimizer. Asking for more, IDTS. ;-) Have a good rest of the day! -- \\\\|// Vijay R. Anisetti |6 6| -------------------oooO--U--Oooo---------------------------- oooO Oooo ( ) ( ) Just hangin on to this profession ---------------\\( -- )/------------------------------------- \\) (/