Re: SQL squential scan on an indexed table
Posted in 1997
Steve Gould wrote:
>
> We are running DSA V7.22 on HP-UX 10.20.
[SNIP]
> WHERE clause. It ran perfectly well under ISQL V4, has anyone any
> ideas of whats wrong ?
>
> select ledger.lecurcode,
> customers.cust,
> ledger.letaxdate,
> ledger.lereference
> from customers, outer ledger
> where customers.cust = ledger.cust_supp
> and (ledger.letype in ("SI", "SC", "JS", "RE", "SD", "DS", "SE", "SR")
> or (ledger.letype = "JN" and ledger.lesource in ("CRN", "SCE"))
> or ledger.letype is NULL)
> and ledger.letaxdate <= TODAY
> order by lecurcode, cust, lereference, letaxdate
Some suggestions and questions:
1) Are the tables fragmented? If so:
a) Fragmentation scheme?
b) Is the index attached or detached?
2) Have you updated statistics according to the 7.2 release notes?
3) Have you tried dropping distributions altogether. Without
distributions the ODS optimizer behaves exactly like the 5.xx optimizer
did.