Hi,
I have faced this issue many times. If u execute the same query many times then SQL will return the query result from cache. So it will provide fast result.
Please use below lines before executing your query.
CHECKPOINT;
GO
DBCC DROPCLEANBUFFERS;
GO
That will remove the cache and provide you the fresh result.
I believe your query will take the same time as your stored procedure.
Please let me know if you have any concern or query on this.
Thanks
Advay Pandya