HSCALE - MySQL Partitioning

Running

First download and install MySQL Proxy. Then download HSCALE and extract it to a folder. This folder is called PATH_TO_INSTALLATION later on.

Follow these steps to start up the MySQL Proxy and HSCALE:

  1. Add the src directory to your LUA_PATH:
    #> LUA_PATH="$LUA_PATH;PATH_TO_INSTALLATION/src/?.lua"
  2. Create your own configuration file and save it to PATH_TO_INSTALLATION/hscale.lua. Now tell HSCALE where to find the configuration:
    #> HSCALE_CONFIG_FILE=PATH_TO_INSTALLATION/hscale.lua
  3. Run MySQL Proxy using the HSCALE module:
    #> mysql-proxy --proxy-lua-script=PATH_TO_INSTALLATION/src/optivo/hscale/main.lua

Now you can simply connect to the MySQL Proxy:

#> mysql -h 127.0.0.1 -P 4040

First Test

For a first test I recommend to just do a CREATE TABLE for a table you configured in your hscale.lua configuration file (see option tableKeyColumns).
Then you should see a couple of tables named tablename_[1|2|3]. Now perform some statements against tablename and see how your rows are stored and retrieved to /from the right table.