OPTION(RECOMPILE) redux (a.k.a. Parameter Embedding Optimization not working)

A long time ago, I had blogged about the perils of ‘wildcard’ query patterns. As a response to one of the comments in that post, I learnt about a new optimization introduced in SQL 2008 wherein the OPTION (RECOMPILE) hint would help in these kind of cases. Ever since then, I had used this in some customers; but recently, I found that on SQL 2008 R2 and even in SQL 2008 SP1, the behavior was not working correctly.

Recently, I found the reason for this issue from some other sites, and I also found the official name for this enhancement: Parameter Embedding Optimization. It turns out that, based on some bug reports, this optimization was disabled starting in SQL 2008 CU4 (and also disabled in SQL 2008 R2 RTM). The fixes for the issue are in SQL 2008 SP1 CU5 and SQL 2008 R2 CU5 respectively.

Here are the links which cover the details, and I hope they help you!

window.open without address bar

Recently we were struggling with trying to figure out how to suppress the address bar for a popup window opened using JavaScript’s window.open method. Normally, there is an option there which allows you to specify ‘location=no’ and the address bar is expected to be hidden. However, no matter what we tried, this did not work for us.

Later on I chanced upon an Internet Explorer setting which actually controls the final display. There is a security setting ‘Allow websites to open windows without address or status bar’:

image

This setting needs to be set to ‘Enable’ for the respective zone (such as Trusted sites etc.) for the address bar display to be suppressed.

Hope this hint helps!