Re: ONLINE V7.20 : Query Optimizer :BIG PROBLEM With LIKE 'AA%'
Posted in 1997
Carlos Costa e Silva wrote:
>
> No indexes ?
>
> sqexplain.out:
>
> QUERY:
> ------
> select number,name
> from persons
> where name like 'Alex%'>
> Estimated Cost: 2
> Estimated # of Rows Returned: 4
>
> 1) persons: INDEX PATH
>
> (1) Index Keys: name person_type number (Key-Only)
> Lower Index Filter: persons.name LIKE 'Alex%'
>
> > -----Original Message-----
SNIP
> > other table...).
> >
> > I have try value 0 or 2 for OPTCOMPIND.
> > I have use UPDATE STATISTICS ......
> >
Just to be sure ...
export OPTCOMPIND=0
> > To test this just type under DBaccess:
> > create database test ;
> > create table x (y integer,x char(20));
> > create index x on x(x);
And do not forget:
UPDATE STATISTICS FOR TABLE x;
> > set explain on;
> > select * from x where x like "aa%";> > you will see the result.
> > Nota: if there is only one field in the table, it works correctly!
> >
> > Is there Anyone who can help me?
> > thanks
> >
> > --
> > Georges SCHNEIDER
> > Incotec Inc.
> >
> > incotec@incotec.fr
Stefan