PDA

View Full Version : Query Optimizer - logical file select/omit



solpssi@bellsouth.net
07-13-2004, 04:13 AM
See response to SELECT SQL - Use of a Logical Use SQL to define indexes (probably better performance) and avoid use of Select/Omit logicals. There is not enough information given to give you a good answer. The Value "X" is probably not unique enough to narrow the data down.

dhinman@blinfo.com
07-13-2004, 05:00 AM
Why won't the Query Optimizer use an existing logical file that has keys and select/omit criteria that match an SQL Select statement? Viewing the debug messages seems to point to the select/omit as the problem. Can the Where clause be changed so the Optimizer will be "influenced" to use the logical file. The statement "select * from fileA where status<>'X' order by key1" won't use logical file fileA1 that has the following DDS definition. A R FORMATA PFILE(FILEA) A K KEY1 A S STATUS COMP(NE 'X')

dhinman@blinfo.com
07-13-2004, 05:00 AM
Thanks for your responses to my questions. The select/omit is not unique enough in our data so that sounds like the problem.