Abstract:
Techniques are provided for creating, organizing, and maintaining a sharded database. A sharded database can be created using user-defined sharding, system-managed sharding, or composite sharding. The sharded database is implemented with relational database techniques. The techniques described provide improvements to load distribution, organization, query processing, and schema propagation in a sharded database.
Abstract:
In accordance with an embodiment, the system enables access to a sharded database. A shard-aware client application connecting to a sharded database can use a connection pool (e.g., a Universal Connection Pool, UCP), to store or access connections to different shards or chunks of the sharded database within a shared pool. As new connections are created, a shard topology layer can be built at the database driver layer, which learns and caches shard key ranges to locations of shards, and enables subsequent connection requests from a client application to use a fast key path access to the appropriate shard or chunk. A connection pool and database driver can be configured to allow a client application to provide a shard key, either during connection checkout or at a later time; recognize shard keys specified by the client application; and enable connection by the client application to a particular shard or chunk.