Explain how you would optimize a slow-performing database query that is blocking a .NET reporting service.