Getting Advice on Queries and Query Plans

In our SQL ConstantCare® mentoring service, we collect data about your SQL Server's health, backups, index designs, wait stats, and more.

You have the option - totally optional - of including queries and query plans, too. If you enable that, we will see your queries, and the queries themselves might contain confidential data. Here's an example:

  FROM dbo.Customers
  WHERE Name = 'Jane Doe'
    AND EmailAddress = '[email protected]'
    AND HomeAddress = '123 Main Street'
    AND SocialSecurityNumber = '123-45-6789';

Should your application ever write queries like that? Obviously not - but it might. Similarly, execution plans include user queries, so they're another route to see this kind of private data. Here's more about how personally identifiable information gets around, and how Microsoft gathers this kind of information by default, too.

Sending in queries and execution plans is entirely up to you. If you want our advice on the queries, we'll need to see the queries, full stop - but not everybody needs advice on their queries. If you only want advice on health, wait stats, and index designs, you'll still get a ton of value out of SQL ConstantCare®.

To enable query and query plan advice, use the --sendplancache true parameter (that's two minus signs, not one) when adding new connections. To edit existing connections:

ConstantCare.exe --editconnection --connectionname MyFriendlyServerName --sendplancache true --datasource MyServerName --timezone America/New_York

Or, if you've got a lot of servers, it may be easier to edit your UserSettings.config file manually. In a text editor, open %localappdata%\ConstantCare\Current\UserSettings.config, and look for the sendplancache lines:

<?xml version="1.0" encoding="utf-8"?>
  <add key="email" value="[email protected]" />
  <add key="SQL2017B_tz" value="America/Los_Angeles" />
  <add key="SQL2017B_sendplancache" value="false" />

Just change the sendplancache values from false to true.