3 Ways to Hide an Index from the Query Plan in MongoDB

Starting from MongoDB 4.4, we can now hide indexes from the query plan. This enables us to evaluate the potential impact of dropping an index without actually dropping the index.

If hiding it has a negative impact, we can unhide the index. This saves us from having to drop the index, then recreate it again.

Below are 3 ways to hide an index in MongoDB.

Continue reading

OPENROWSET does not accept variables for its arguments (SQL Server)

If you’re trying to use OPENROWSET to run an ad hoc distributed query in SQL Server, but you keep getting an “incorrect syntax” error, and you just can’t see anything wrong with your syntax, it could be that you’re trying to use a variable for one of the arguments.

As mentioned in the title of this post, OPENROWSET does not accept variables for its arguments.

If you’re using variables as arguments, try changing these to string literals.

Continue reading