July 2012

Waiting for Locks in SQL Server

Transact-SQL 2008 allows code to specify the number of milliseconds that a statement waits for a lock to be released. If the timeout is exceeded while a statement waits, the error message 1222 is raised. The default lock_timeout value is -1, which is equivalent to infinity in this context. The statement below sets that timeout […]

Read more →

Random number and string generator

There are a number of posts floating around the forums that dbms_random is deprecated in 11g. Apparently it all started here at psoug.org because someone there can’t read and understand the manual. What the 11gR1 manual says is that three of the sub-programs have been deprecated: INITIALIZE, RANDOM and TERMINATE. Now that this is cleared […]

Read more →

Result Cache

I’ve been reading about the SQL Query Result Cache. This is where actual query results are cached so that the query doesn’t need to be run again unless something in the tables has been changed. It could be thought of conceptually as creating an on-the-fly materialized view for that specific query. I was planning a […]

Read more →