Skip to main content

DBmarlin Co-pilot AI

DBmarlin Co-pilot is an AI assistant in the form of a chat bot that can be accessed from any screen within DBmarlin via the right-side slide-out panel. It is powered by OpenAI's GPT models which are very powerful for answering questions on databases and giving tuning recommendations. With one click, it is always there to answer any questions you have. There are also specific integrations for tuning wait event and tuning SQL statements, where we have a "Send to DBmarlin Co-pilot" button that will automatically formulate a prompt and send it to the AI assistant.

co-pilot.gif

Setting up Co-pilot​

DBmarlin Co-pilot requires an account with OpenAI. Once signed up you can go to https://platform.openai.com/api-keys and "Create new secret key" to generate an API key you can use with DBmarlin Co-pilot.

When you first open the Co-pilot panel you should:

  1. Select which model you wish to use (see models below)
  2. Read the conditions of use and accept them with the checkbox.
  3. Paste in your OpenAI API key into the box
  4. Click the button to save these setting which will be remembered.

Accept the terms and enter API key.

Select the model you want to use​

DBmarlin AI Co-pilot supports the following models from OpenAI. Usually the best option will be to use gpt-4o which can be used on a free plan with some usage limitations.

ModelDescriptionPaid OpenAI plan needed?
gpt-3.5-turboFast, inexpensive model model. Good for generic tuning recommendations.No
gpt-4-turboFast, requires a paid plan. Give high quality specific tuning recommendations.Yes
gpt-4oSame as gpt-4-turbo but is 2x faster and is 50% cheaper.Yes

Using AI with caution​

While an AI assistant can be very powerful and save a huge amount of time, any recommendations should first be checked and validated in a test environment before trying in production. DBmarlin software, Application Performance Ltd or OpenAI can not guarantee the accuracy of its recommendations and cannot take any responsibility or liability for any changes that you choose to make as a result.

Some guidelines:

  1. Check your company policy allows for the use of AI assistants and specifically OpenAI and that any information you send to it is within the acceptable use policy for your organisation.
  2. Thoroughly test any recommendation such as indexes, db parameters, SQL rewrites, schema changes in a test environment.
  3. Use DBmarlin comparison reports to compare the performance before and after any change to validate the impact.
  4. Beware of applying changes that might trigger additional licensable features from the database vendor. For example, the table partitioning option for Oracle is an Enterprise edition feature which you may not be licensed for.

DBmarlin Co-Pilot for Wait event recommendations​

On the "Database instance details" screen, there is a "Send to DBmarlin Co-pilot" button at the top of the Top Waits pie chart panel. Clicking this will request advice from DBmarlin Co-pilot on tuning the top wait events. For each of the top wait events it will give a short description of what they mean and what can be done to reduce the wait time. You can follow up using the chat box to ask for further clarification of any particular suggestions.

Example showing suggestions for Oracle RDS waits such as Resmgr: cpu quantum.

Example showing suggestions for Oracle RDS waits such as Resmgr: cpu quantum.

DBmarlin Co-Pilot for SQL Tuning​

On the "Statement and Plans" screen for any SQL statement, there is a "Send to DBmarlin Co-pilot" button. Clicking this will prompt the system to request advice on tuning the selected statement. DBmarlin Co-pilot responds with suggestions such as creating indexes where appropriate (including the DDL statement to create the index). It may also suggest other optimisations such as adjusting database parameters, partitioning, updating table statistics, using materialised views, or rewriting the query.

Example showing an index recommendation for Oracle RDS to avoid a FULL TABLE SCAN

Example showing an index recommendation for Oracle RDS to avoid a FULL TABLE SCAN

DBmarlin Co-pilot demonstrates that AI can significantly reduce the time investment required for complex tasks such as database tuning and SQL optimisation, even for seasoned experts.

Tasks that once took hours are now significantly more streamlined. Looking towards the future, it's evident that artificial intelligence (AI) is not just a passing trend. It's a fundamental technology shaping our future and will become an even more potent tool for saving time.

Video Walkthrough of DBmarlin Co-Pilot AI​