performance killing you because you are pulling all records from both table first, THEN applying the where condition... try changing to
FROM (
SELECT * FROM current_products
WHERE product_code = 'some_prodcut_code'
UNION
SELECT * FROM historical_products
WHERE product_code = 'some_prodcut_code'
) u
JOIN other_tables t
This way, the internal query can work against the indexes of the underlying products tables (presuming you HAVE an index on the product_code in the first position, or with other criteria you may want to also apply).