Subject More FB 2.0 / FB1.5 optimizer differences
Author Hans
What I'm I doing wong ?
Any ideas ?

Tried doubling buffer sizes in FB2.0 .. but

Best Regard
Hans

------------------------------------------------------------------------
Same Server, Same data

FB1.5: runtime 29 Secs ODS 10.1
FB2.0: runtime 240 Secs ODS 11.0
------------------------------------------------------------------------
select distinct o.mud_name oil_co,
s.lsd,
s.date_started,
m.mud_name

from sites s

join tickets t on (t.soldtosite_uniquenum = s.site_uniquenum
or t.shiptosite_uniquenum = s.site_uniquenum )
and t.ref_ticket_uniquenum is null

join mudcompanies o on o.mud_uniquenum = s.cust_uniquenum

join warehouses w on w.house_uniquenum = s.house_uniquenum
and w.training <> 'T'

join mudcompanies m on m.mud_uniquenum = t.mud_uniquenum

where s.wellcompleted <> 'T' and current_date - s.date_started <= 120
order by o.mud_name, s.lsd, m.mud_name
------------------------------------------------------------------------
knowing that there aslway is a value preset for two of the joins, changing
them to left outer joins

FB1.5: runtime 3 Secs
FB2.0: runtime 29 Secs
------------------------------------------------------------------------
select distinct o.mud_name oil_co,
s.lsd,
s.date_started,
m.mud_name

from sites s

join tickets t on (t.soldtosite_uniquenum = s.site_uniquenum
or t.shiptosite_uniquenum = s.site_uniquenum )
and t.ref_ticket_uniquenum is null

left outer
join mudcompanies o on o.mud_uniquenum = s.cust_uniquenum

join warehouses w on w.house_uniquenum = s.house_uniquenum
and w.training <> 'T'

left outer
join mudcompanies m on m.mud_uniquenum = t.mud_uniquenum

where s.wellcompleted <> 'T' and current_date - s.date_started <= 120
order by o.mud_name, s.lsd, m.mud_name
------------------------------------------------------------------------