Re: Query Optimisation on SE 5.0
Posted in 1994
> > I have a system under SCO Unix 4.2 with SE 5.0 engine and RDS 4.10 which > is doing a large (12 table) join. > > The problem is that the query optimiser is taking a perverse route > slowing the query down substantially and this is happening because it > thinks sequential access is *much* cheaper than indexed access - costs > given by SET EXPLAIN are around 200 to 17000 if I query this table > separately. > > Any ideas? - apart from Online or hacking the data in systables! > > Paul Hatcher Graduate Associates Ltd +44 81 840 3110 - Phone Paul, If you could post the set explain output and the list of indexes available on each table in the select its possible help would come. Also it can still be true that the way the select is written, such as the order of tables in the from clause, can have a significant impact on the optimiser. Try rewriting the query with the from and where clauses written up and bracketed in the order in which you want processing to be done. Lastly and obviously has update statistics been run recently :-) Often an embarrassing question but sometimes necessary. Cheers - Jim My opinions are my own. They may vary with time but they remain MINE! ---------------------------------------------------------------------- Name: Jim Gordon Company: DHL Systems Inc, Burlingame, CA, USA ----------------------------------------------------------------------