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 4.0 model which is 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 a paid licence from OpenAI which starts from $20/user/month. 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 read the conditions of use and accept them with the checkbox. You also need to paste in your OpenAI API key into the box.

Accept the terms and enter API key.

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