optimize_index is the parameter file that defines the optimization methods that can be used during the Smart Tables process or manual optimizations launched from the table.

It refers to parameters defined in the Analyzer (Advanced mode).

Parameters

ParameterType Choices/DefaultDescription
NameString
Name of the optimization process. 
coefDouble
Coefficient for splitting indexes. The more is value is high, the more indexes you will have. (decimal separator: point)
nbDaysInt
Number of days to get queries to analyze on.
minHitsInt
Minimum number of times a field appears in SQL queries.
specString
  • NOT_SPECIALIZED
  • HALF_SPECIALIZED
  • FULLY_SPECIALIZED
  • NOT_SPECIALIZED : Expressions are proposed for high cardinality field.
  • HALF_SPECIALIZED : Expressions in SELECT clause and WHERE clause, for high cardinality field, are proposed.
  • FULLY_SPECIALIZED : Expressions are always proposed.
index-hintString
  • TUNING
  • FULL
  • TUNING : Limit indexes changes by maximizing current indexes use. This option let you have fewer, more compact indexes, 
  • even if some queries will have to use the K-Store.
  • FULL : All suggestions are given, leading to having at least one index for each query. Can be memory expensive but ensure performance.
automaticString
  • CREATE_ONLY
  • CREATE_DELETE
  • LOG
  • CREATE_ONLY : Create all indexes proposals, but don't remove any.
  • CREATE_DELETE : Create and delete all indexes proposals.
  • LOG: log what could have been done if the CREATE_DELETE mode would have been used
prejoinBoolean
  • True
  • False
If true, pre-join indexes are proposed by the analyzer.

Example

Optimize_index

{
"optimizations": [
	{
		"name": "Last month tuning",
		"coef": 4.0,
		"nbDays": 30,
		"minHits": 1,
		"spec":"NOT_SPECIALIZED",
		"index-hint":"TUNING",
		"automatic": "CREATE_DELETE",
		"prejoin" : true
	},
	{
		"name": "Last day tuning",
		"coef": 4.0,
		"nbDays": 1,
		"minHits": 1,
		"spec":"NOT_SPECIALIZED",
		"index-hint":"TUNING",
		"automatic": "CREATE_DELETE",
		"prejoin" : true
	},
]
}
JAVA