XMLWordPrintable

    Details

      Description

      To tell MySQL cluster to store data on disk (when they are not PK, because PK always go to RAM), while creating tables, tablespaces need to be assigned. 

      First MySQL Cluster needs to have defined tablespaces, this can be done by adding 

       

          TABLESPACE ts_1 STORAGE DISK    ENGINE NDBCLUSTER;
      

       

      at the end of the table creation, for example:

       

      CREATE TABLE dt_1 (    member_id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,    last_name VARCHAR(50) NOT NULL,    first_name VARCHAR(50) NOT NULL,    dob DATE NOT NULL,    joined DATE NOT NULL,    INDEX(last_name, first_name)    
      )    
      TABLESPACE ts_1 STORAGE DISK    
      ENGINE NDBCLUSTER;

       

      The table space needs to exist, this can be done 1 file per table or 1 file for all, this will need to be added in the sqldef scrips automatically created by SAL.

       

      This process has been described here:

      https://confluence.lsstcorp.org/display/LTS/MySQL+Internal+configuration

        Attachments

          Activity

          Hide
          dmills Dave Mills added a comment -

          Made redundant by move to Kafka/Influxdb

          Show
          dmills Dave Mills added a comment - Made redundant by move to Kafka/Influxdb

            People

            Assignee:
            dmills Dave Mills
            Reporter:
            aanania Andres Anania [X] (Inactive)
            Watchers:
            Andres Anania [X] (Inactive), Andres Villalobos [X] (Inactive), Andy Clements, Dave Mills, Te-Wei Tsai, Tiago Ribeiro
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.