ScyllaDB University Live | Free Virtual Training Event
Learn more
ScyllaDB Documentation Logo Documentation
  • Server
  • Cloud
  • Tools
    • ScyllaDB Manager
    • ScyllaDB Monitoring Stack
    • ScyllaDB Operator
  • Drivers
    • CQL Drivers
    • DynamoDB Drivers
  • Resources
    • ScyllaDB University
    • Community Forum
    • Tutorials
Download
ScyllaDB Docs ScyllaDB C# driver FAQ

FAQ¶

Which versions of Apache Cassandra does the driver support?¶

The driver should wotk with any Apache Cassandra version from 2.0+, but we do not maintain support for it.

Which versions of ScyllaDB does the driver support?¶

The driver supports Scylla 5.x+ and Scylla Enterprise 2021.x+.

Should I create multiple ISession instances in my client application?¶

Normally you should use one ISession instance per application. You should share that instance between classes within your application. In the case you are using CQL and Graph workloads on a single application, it is recommended that you use different execution profiles on the same session.

Can I use a single ICluster and ISession instance for graph and CQL?¶

We recommend using a single session with different execution profiles for each workload, as different different workloads should be distributed across different datacenters and the load balancing policy should select the appropriate coordinator for each workload.

Should I dispose or shut down ICluster or ISession instances after executing a query?¶

No, only call cluster.Shutdown() once in your application’s lifetime, normally when you shutdown your application. Note that there is an async version, i.e., cluster.ShutDownAsync() which is like an async Dispose. Shutting down the cluster will automatically shutdown all session instances created by this cluster.

How can I enable logging in the driver?¶

The driver allows you to plug in any ILoggerProvider implementation, like NLog and Serilog implementations.

You should set the provider before initializing the cluster, using the Diagnostics class:

// Use the provider you prefer, in this case NLog
ILoggerProvider provider = new NLogLoggerProvider();

// Add it before initializing the Cluster
Cassandra.Diagnostics.AddLoggerProvider(provider);

You can configure the log levels you want to output using the provider API.

Alternatively, if you don’t want to use a ILoggerProvider implementation, the driver can expose log events using the .NET Tracing API.

// Specify the minimum trace level you want to see
Cassandra.Diagnostics.CassandraTraceSwitch.Level = TraceLevel.Info;

// Add a standard .NET trace listener
Trace.Listeners.Add(new TextWriterTraceListener(Console.Out));

What is the recommended number of queries that a batch should contain?¶

It depends on the size of the requests and the number of tables affected by the BATCH. Large batches can cause a lot of stress on the coordinator. Consider that Cassandra batches are not suitable for bulk loading, there are dedicated tools for that. Batches allow you to group related updates in a single request, so keep the BATCH size small (in the order of tens).

Starting from Cassandra version 2.0.8, the node issues a warning if the batch size is greater than 5K.

What is the best way to retrieve multiple rows that contain large-sized blobs?¶

You can decrease the number of rows retrieved per page. By using the SetPageSize() method on a statement, you instruct the driver to retrieve fewer rows per request (the default is 5000).

Was this page helpful?

PREVIOUS
Vector support
NEXT
Upgrade Guide
  • Create an issue
  • Edit this page

On this page

  • FAQ
    • Which versions of Apache Cassandra does the driver support?
    • Which versions of ScyllaDB does the driver support?
    • Should I create multiple ISession instances in my client application?
    • Can I use a single ICluster and ISession instance for graph and CQL?
    • Should I dispose or shut down ICluster or ISession instances after executing a query?
    • How can I enable logging in the driver?
    • What is the recommended number of queries that a batch should contain?
    • What is the best way to retrieve multiple rows that contain large-sized blobs?
ScyllaDB C# driver
  • master
    • master
  • Features
    • Address resolution
    • Authentication and Authorization
    • Automatic failover
    • Column Encryption
    • Driver components
      • ADO.NET
      • Core component
        • Statements
          • Batch statements
          • Per-query keyspace
          • Prepared statements
          • Simple statements
      • Linq component
        • Batch statements with LINQ
      • Mapper component
        • Batch statements with the Mapper
    • Connection heartbeat
    • Connection pooling
    • CQL data types to C# types
      • Date and time representation
      • Nulls and unset
    • Execution Profiles
    • Graph support
    • Cluster and schema metadata
    • Metrics
      • App.Metrics Provider
      • List of metrics
    • Native protocol
    • OpenTelemetry
    • Result paging
    • Parameterized queries
    • Query timestamps
    • Query warnings
    • Request Tracker
    • Routing queries
    • Speculative query execution
    • TLS/SSL
    • Tuning policies
    • User-defined functions and aggregates
    • User-defined types
    • Vector support
  • FAQ
  • Upgrade Guide
  • Examples
  • API Reference
Docs Tutorials University Contact Us About Us
© 2025 ScyllaDB | Terms of Service | Privacy Policy | ScyllaDB, and ScyllaDB Cloud, are registered trademarks of ScyllaDB, Inc.
Last updated on 01 Aug 2025.
Powered by Sphinx 7.4.7 & ScyllaDB Theme 1.8.7
Ask AI