Database Optimizer FAQ

General Questions

What is Cast AI Database Optimizer (DBO)?

Cast AI Database Optimizer is a fully autonomous, AI-driven database cache that intercepts database traffic, intelligently caches query responses, and reduces infrastructure costs while improving performance. Unlike traditional caching solutions, DBO requires no code changes or configuration, making it a true plug-and-play solution. See our How does it work documentation for a detailed architecture explanation.

How does DBO differ from traditional caching solutions like Redis?

Unlike Redis and other traditional caching solutions, which require significant development effort (identifying what to cache, writing cache logic, implementing invalidation strategies), DBO is fully autonomous. It requires zero code changes and zero configuration and uses AI to automatically determine what to cache and for how long. This eliminates weeks or months of development work and ongoing maintenance.

What databases does DBO currently support?

DBO currently supports PostgreSQL versions 13 through 16. Support for MySQL, MariaDB, Microsoft SQL Server, and GraphQL is on the roadmap. For the most up-to-date information on supported databases, please check our Supported Platforms documentation.

Can I use DBO with any cloud provider?

Yes. While performance insights are currently only available for AWS RDS instances, the caching capabilities work with any PostgreSQL deployment, regardless of where it's hosted.

Performance and Cost Benefits

How much can DBO reduce my database costs?

Most customers see at least a 30% reduction in database infrastructure costs after implementing DBO. This is achieved by reducing the load on your primary database through intelligent caching, potentially allowing you to downsize your database instances.

What performance improvements can I expect?

DBO typically delivers query responses in less than 1ms (compared to hundreds of milliseconds for direct database queries). Our customers have seen up to 400x faster query responses and up to 10x less compute required. Throughput can increase dramatically as well.

How quickly will I see benefits after deploying DBO?

Once DBO is deployed and your applications are connected, you'll see immediate benefits. The AI-driven caching engine starts learning and optimizing from the first query, with full benefits typically realized within hours as the system continues to learn your query patterns.

Does DBO improve all types of queries?

DBO caches read queries (SELECT statements and similar operations). Write operations (INSERT, UPDATE, DELETE) are passed through to the origin database.

The most significant performance improvements will be seen for frequently executed read queries, especially those that are computationally expensive or access large datasets.

However, by reducing the overall load on an overprovisioned database, DBO can improve performance for all queries, including write operations. When the database is no longer struggling with excessive read traffic, it can process write operations more efficiently as well.

Technical Details

How does the deployment process work?

Deployment is handled via a simple script that installs the necessary components into your Kubernetes cluster. The process takes just a few minutes and is guided through the Cast AI console. For detailed instructions, see our Quick Start Guide.

Does DBO require changes to my application code?

No. DBO operates at the database protocol level and requires only a change to your database connection string. There are no code changes needed in your application logic, data models, or caching strategies.

How does DBO maintain data consistency?

DBO uses a multi-layered approach called Smart Invalidation to ensure global eventual consistency:

  1. SQL query parsing to analyze which rows are being read or written
  2. Table-level invalidation for complex queries
  3. Automated detection of unexplained data changes

Additionally, DBO implements read-after-write semantics, bypassing the cache briefly after write operations to ensure immediate consistency.

Will DBO work with my existing failover or high availability setup?

Yes. DBO works seamlessly with existing failover mechanisms. For databases that already use master/slave or pooled setups, you simply make the DBO hostname the primary server. For direct database connections, DBO supports comma-separated hostnames in connection strings for failover purposes. See our Application Failover Configuration guide for details.

Does DBO store my data outside my infrastructure?

No. The cached data remains entirely within your infrastructure. Only anonymized metadata about query patterns is sent to the Cast AI control plane to power the management console and optimization algorithms. No PII or sensitive data ever leaves your environment.

Implementation and Management

How long does it take to implement DBO?

Most customers implement DBO in minutes, not weeks or months. The process involves:

  1. Deploying the cache components to your Kubernetes cluster
  2. Updating your application's database connection string
  3. Testing and verification

Unlike traditional caching solutions that can take months to implement, DBO delivers immediate value with minimal effort.

How does DBO handle database schema changes or application updates?

DBO automatically adapts to schema changes and application updates. Since it operates at the protocol level and makes caching decisions in real-time, there's no need to update caching rules or configurations when your application evolves. This makes DBO "future-proof" - as your application grows and changes, DBO's caching advantages automatically apply to new features and queries.

Can I monitor DBO's performance and effectiveness?

Yes. The Cast AI console provides detailed metrics on cache hit rates, query performance, and estimated cost savings. You can track performance improvements over time and see the impact on your database infrastructure at both the instance and logical database levels.

How does DBO handle database upgrades or migrations?

DBO is transparent to database upgrades and migrations. Once your database migration is complete, simply update the DBO connection configuration to point to the new database, and DBO will continue working seamlessly.

What happens if the DBO cache fails?

DBO is designed with reliability in mind. It leverages Kubernetes' built-in high availability features and also supports failover connections. If the DBO cache becomes unavailable for any reason, your applications can automatically fall back to connecting directly to the database, ensuring continuous operation.

Getting Started

How can I try DBO for my databases?

You can get started with DBO by signing up for a Cast AI account and following our Quick Start Guide.

What permissions does DBO need to access my database?

For the caching functionality itself, DBO doesn't require any special permissions on your database—it just needs network access to connect to it like any other client application would. The only requirement is that you deploy DBO in a Kubernetes cluster that has network connectivity to your database.

The permissions described in our Access Requirements and Permissions documentation are only required for the optional Performance Insights feature with AWS RDS. These are permissions on your AWS account (not on the database itself) that allow Cast AI to collect performance metrics to show you data about your database performance in the console.

Can I customize caching behavior for specific queries?

While DBO's AI-driven approach is designed to automatically optimize caching without configuration, advanced users can override the automated caching with manual rules if desired. Time-to-live (TTL) values can be configured for specific queries or query patterns to provide fine-grained control.

What if I need help implementing or troubleshooting DBO?

Cast AI provides comprehensive support for DBO customers. Our team is available to help with implementation, optimization, and any questions you might have about the product.