Given a slow-running analytical query joining three massive fact tables, how would you diagnose and optimize it for Pattern-scale analytics?