We're running SQL Server Express 2008. Usually a query ran in Access using linked SQL tables runs much slower same query converted and run as a stored procedure in SQL Server. However, there is one Access query that has two subqueries that was converted to a storedprocedure that has two functions and the stored procedure (when there are lots of records) runs much slower. Could this be because in Access the sub queries are processed first and then the results are used in the main query, whereas in SQL Server the both functions and the storedprocedure are all processed at once? If so, is there a way to get SQL Server to process functions used in stored procedure first? Also, how do you optimize stored procedures that run particularly slow in the rare case when there are a lot of records but run much faster when there aren't. Note: the design of our applications would make archiving records difficult.