Procedure Cache and Query Plan
ASE maintains MRU/LRU (most recently used/least recently used) algorithm. Stored procedures generally preferred over separate SQL statements because when users execute stored procedure, Adaptive server search procedure cache for existing query plan. If it is available then execution begins.
If Query plan is not available or all copies are in use, if multiple users are executing same stored procedure at a time then multiple copies of query plan will be available in procedure cache until size of cache is supporting, then query tree for the procedure is read from the sysprocedures table . Then query tree is then optimized, based on the parameters passed to the procedures and converted into query plan and then execution begins.
Check the Sybase Wiki @ sybasewiki.com