Microsoft interview question

Can you explain how to optimize a SQL query for large datasets?