Re: Query Optimizer
Posted in 1994
In article <dennisp.762623729@puma>, Dennis Pimple <dennisp@informix.com> wrote: >root@perk.jpr.com (Joseph A. Miele) writes: > > >>The following two queries QUERY 1 and QUERY 2 are the output of SET EXPLAIN >>ON. I do not understand why the query optimizer does a sequential scan on >>root.alujobsh in QUERY 2. The only difference in the two queries are these >>lines: > >>QUERY 1: atkliquh.inv_num = '12316' and > >>QUERY 2: atkliquh.inv_num >= '12316' and atkliquh.inv_num <= '12316' and > >I'm no Query Optimizer expert, by try: > >atkliquh.inv_num BETWEEN '12316' AND '12316' and > >and see if the sequential scan gets moved to a lower level again. > >================ >Dennis J. Pimple >Informix CSE / Denver >303-850-0210 Using between makes no difference, the query optimizer reformats the statement to be "inv_num >= 12316 and inv_num <= 12316". -- Unix at Home perk machine Joseph A. Miele jam@perk.jpr.com Dir MIS Spectraserv, Inc. 76207.1365@compuserve.com