DBA > Job Interview Questions > Sybase Interview Questions and Answers

When should I execute an sp_recompile in Sybase?

More DBA job interview questions and answers at http://dba.fyicenter.com/Interview-Questions/

(Continued from previous question...)

When should I execute an sp_recompile in Sybase?

An sp_recompile should be issued any time a new index is added or an update statistics. Dropping an index will cause an automatic recompile of all objects that are dependent on the table.

The sp_recompile command simply increments the schemacnt counter for the given table. All dependent object counter's are checked against this counter and if they are different the SQL Server recompiles the object.

(Continued on next question...)

Other Job Interview Questions