Skip to main content
Skip table of contents

Indexes & Dictionaries API

Indexes API allows you to retrieve indexes, memory, and dictionaries for all tables across your Indexima cluster.

Please note that views don't have indexes, dictionaries, or memory footprints.

Retrieve all indexes

Retrieve all indexes in your Indexima cluster.

CODE
GET /api/monitor/get/indexes

JSON Format

The index has the following JSON format:

NameTypeDescription
schemas.schemaStringThe schema name
schemas.tablesArray
NameTypeDescription
tables.nameStringThe table name
tables.dicoIntegerThe dictionaries memory size, in bytes
tables.indexesArray
NameTypeDescription
indexes.nameString The index name
indexes.countInteger The index number of rows
indexes.sizeIntegerThe index memory size, in bytes
indexes.mainBoolean If this index contains all the table columns


Example response

XML
{
  "schemas": [
    {
      "schema": "default",
      "tables": [
        {
          "name": "nyc_yellow",
          "dico": 812454,
          "indexes": [
            {
              "name": "nyc_yellow0",
              "count": 10000,
              "size": 15000,
              "main": true
            }
          ]
        }
      ]
    }
  ]
}

Get the memory used for each index

Retrieve the memory used for all tables on each node of your cluster. This request is equivalent to executing a SHOW MEMORY ALL SQL command.

CODE
GET /api/monitor/get/memory

JSON Format

Memory is represented by a tree structure with the following path :

Name of the node -> Schema -> Table -> Index

NameTypeDescription
loadedBooleantrue if the current index is loaded in memory.
dictionaryIntegerThe dictionaries memory size, in bytes
sizeIntegerThe index memory size, in bytes
countIntegerThis index number of lines
bucketsizeIntegerThe bucket disk size

isLimited

Booleantrue if the parent table is a limited table
isOnErrorBooleantrue if this index is on error and can't be used
isDimensionBooleantrue if the parent table is a dimension table
isExternalBooleantrue if the parent table is an external table
isTemporaryBooleantrue if the parent table is a temporary table 

Example response

JS
{
 "Node 0": {
   "etalon": {
     "nyc_cab_dim_dest": {
       "nyc_cab_dim_dest0": {
         "loaded": true,
         "dictionary": 8729279,
         "size": 2716092,
         "isOnError": false,
         "isDimension": true,
         "isExternal": false,
         "count": 81276,
         "isTemporary": false,
         "bucketsize": 0
      }
    }
  }
}  

Get the dictionaries details

Retrieve the dictionary details used for all tables on each node of your cluster. This request is equivalent to executing a SHOW DICTIONARIES ALL SQL command.

CODE
GET /api/monitor/get/dictionaries

JSON Format

Dictionary is represented by a tree structure with the following path :

Name of the node -> Schema -> Table -> Dictionary field or expression

Two structures are sent : 

  • Total memory and lines count, by node
  • Details for each table on each node
NameTypeDescription
sizeIntegerThe dictionary memory size, in bytes
countIntegerThe dictionary number of words
loadedBooleantrue is this dictionary is currently in memory

Example response

JS
{
  "totals": {
    "bynodes": {
      "Node 0": {
        "count": 5440,
        "size": 26907305,
		"loaded": true
      }
    }
  },
  "details": {
    "Node 0": {
      "etalon": {
        "nyc_yellow_full": {
          "(Floor(If((1=0),NULL,(`etalon`.`nyc_yellow_full`.`trip_distance`/1)))<60)": {
            "count": 1,
            "size": 1048998,
		    "loaded": true
          },
          "passenger_count": {
            "count": 8,
            "size": 1049854,
            "loaded": false
          }
        }
      }
    }
  }
}

 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.