I need to pull some data out of a progress 8.3C database using SQL. The SQL I want to use is shown below. What I can't decide is what is the best index to use ? I've tried various with a variety of results but am still finding the retrieval to be sluggish.
Thanks In Advance
SELECT
a.tour_reference,
a.departure_date,
a.Departure_Year,
a.Departure_Week_No,
a.Departure_Period_No,
a.confirm_date,
a.Duration,
a.no_of_pax,
a.no_infants,
a.no_insured,
a.Gross_Turnover,
a.Insurance_Amount,
a.Discount_Amount,
a.Outward_Pickup,
a.Outward_Scheme,
a.market_segment_code,
a.prod_group_code,
a.Dest_Country,
a.Dest_Region,
a.dest_code,
a.campaign_code,
e.dest_name,
f.region_desc,
g.country_name,
d.agent_ref,
b.market_segment_desc,
c.prod_group_desc
FROM
mis.booking_history a,
mis.country g,
mis.region f,
mis.destination e,
mis.agents d,
mis.product_group c,
mis.market_segment b
WHERE
b.market_segment_code = a.market_segment_code AND
c.prod_group_code = a.prod_group_code AND
d.agent_ref = a.agent_ref AND
e.country_code = a.Dest_Country AND
e.dest_code = a.dest_code AND
e.region_code = a.Dest_Region AND
f.country_code = a.Dest_Country AND
f.region_code = a.Dest_Region AND
g.country_code = a.Dest_Country AND
a.booking_status < "C" AND
a.Departure_Year = 2002 AND
a.user_code like 'sct%' and
a.agent_ref IN ("55747", "CWIDE")