PHPackages                             akalend/mysql\_shard - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. akalend/mysql\_shard

ActiveLibrary[Database &amp; ORM](/categories/database)

akalend/mysql\_shard
====================

A Mysql wrapper client for scaling database

4161PHP

Since Jan 28Pushed 7y ago2 watchersCompare

[ Source](https://github.com/akalend/mysql_shard)[ Packagist](https://packagist.org/packages/akalend/mysql_shard)[ RSS](/packages/akalend-mysql-shard/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

mysql\_shard - php package for MySQL scaling.
=============================================

[](#mysql_shard---php-package-for-mysql-scaling)

The client wrapper on mysqlnd driver for scaling database

\##Basic

**The Sharding** - is the method of dividing of the large logical table to many small phisycal tables. The type of CONFEDERATED Mysql Tables is simle sharding.

The **Strategy of Sharding** is algorithm of distribution database records by phisycal tables.

The **Sharding criterion** is function or rule by according to which the record send to one or other database tables

\#Requitments

- MySQL 5.0 or more
- Redis 2.0 or more

If You use other Kyy/Value NoSQL (Not Redis), You can use the it. For example, MemcacheDb, Tarantool or AeroSpike. Send me message an I add the new PHP-class for your storage engine.

\##Use Sharding Strategy

- Linear
- Cycle
- Monthly
- Geo (in developing)

\##Linear Sharding

The sharding use increasing id and data filling one table (table\_0), then another table (table\_1) and etc (table\_2, table\_3 ...).

Insert Example:

```
