Gastroscopy is highly effective in detecting early-stage cancers and precancerous conditions like Barrett's esophagus. Early detection significantly improves the prognosis and allows for less invasive treatment options. However, the effectiveness of the procedure depends on factors such as the quality of the equipment, the expertise of the healthcare provider, and the patient's specific condition.