I need help troubleshooting a performance issue. I have a stored procedure that is selecting from 3 joined tables, and is hanging on the first time this procedure is running.
Sometimes hanging so long that I get a timeout error. After the first run, it's faster, but still takes longer than it should.
On average it returns 3-4 rows, but it is selecting from hundreds of thousands. Any ideas on how to alleviate the first run timeout, and possible optimization tips?