Important
The SingleStore 9.1 release candidate (RC) is available now. It will be promoted to general availability (GA) soon and at that time it will be renamed to SingleStore 10.
In the interim, SingleStore 9.1 RC can be used to preview, evaluate, and provide feedback on the new and upcoming features in SingleStore 10, while SingleStore 9.0 is recommended for production workloads.
JSON_ COLUMN_ SCHEMA
On this page
This view contains information about the schema inferred for JSON columns in columnstore tables.
This schema view reads blobs from disk and fetches blobs from unlimited storage databases.
-
DATABASE_,NAME -
TABLE_,NAME -
COLUMN_, and/orNAME -
SEGMENT_ID
|
Column Name |
Description |
|---|---|
|
|
The name of the related database. |
|
|
The name of the related table. |
|
|
The name of the related column. |
|
|
The partition’s number or placement among all the partitions. |
|
|
The schema inferred for the JSON column in a segment. |
|
|
The ID of a given segment. |
|
|
Refers to which page within the JSON encoding is being described. |
|
|
The number of rows in a given segment. |
|
|
Refers to which encoding is used to store the JSON column for a segment (i. |
|
|
The number of key paths inferred for the segment. |
|
schemaSize |
The size of |
Example
Below is a sample output from the json_ view.SCHEMA_ field has been formatted to make it easier to read.
CREATE DATABASE examples;USE examples;CREATE TABLE json_exp(col_a json, sort KEY());INSERT INTO json_exp VALUES('{"alpha": 1}'),('{"alpha": 1, "beta": "gamma"}');OPTIMIZE TABLE json_exp FULL;SELECT * FROM information_schema.json_column_schema WHERE database_name = 'examples'\G
*** 1. row ***
DATABASE_NAME: examples
TABLE_NAME: json_exp
COLUMN_NAME: col_a
PARTITION_ORD: 2
SCHEMA_JSON: {
"JSON_DOC": {
"RepetitionType": "Required",
"data": {
"RepetitionType": "Required",
"alpha": {
"CompressedSize": 12,
"DefinitionLevelEncoding": "Integer",
"DefinitionLevelSize": 4,
"NumNulls": 0,
"NumValues": 1,
"RepetitionLevelEncoding": "Integer",
"RepetitionLevelSize": 4,
"RepetitionType": "Required",
"Type": "Int64",
"UncompressedSize": 12,
"ValueEncoding": "Integer"
}
}
}
}
SEGMENT_ID: 1
SEGMENT_ID: 3
PAGE_ID: 0
ROWS_COUNT: 1
ENCODING: SeekableJSON
*** 2. row ***
DATABASE_NAME: examples
TABLE_NAME: json_exp
COLUMN_NAME: col_a
PARTITION_ORD: 3
SCHEMA_JSON: {
"JSON_DOC": {
"RepetitionType": "Required",
"data": {
"RepetitionType": "Required",
"alpha": {
"RepetitionType":"Required",
"alpha":{
"CompressedSize": 12,
"DefinitionLevelEncoding": "Integer",
"DefinitionLevelSize": 4,
"NumNulls": 0,
"NumValues": 1,
"RepetitionLevelEncoding": "Integer",
"RepetitionLevelSize": 4,
"RepetitionType": "Required",
"Type": "Int64",
"UncompressedSize": 12,
"ValueEncoding": "Integer"
},
"beta": {
"CompressedSize": 33,
"DefinitionLevelEncoding": "Integer",
"DefinitionLevelSize": 4,
"NumNulls": 0,
"NumValues": 1,
"RepetitionLevelEncoding": "Integer",
"RepetitionLevelSize": 4,
"RepetitionType": "Required",
"Type": "ByteArray",
"UncompressedSize": 33,
"ValueEncoding": "SeekableString"
}
}
}
}
SEGMENT_ID: 1
PAGE_ID: 1
ROWS_COUNT: 1
ENCODING: SeekableJSONLast modified: