Skip to content

Instantly share code, notes, and snippets.

@abhi-bit
Created January 22, 2020 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhi-bit/296d0c77a930540e47a6a949ad1e1aba to your computer and use it in GitHub Desktop.
Save abhi-bit/296d0c77a930540e47a6a949ad1e1aba to your computer and use it in GitHub Desktop.
{
"plan": {
"#operator": "Sequence",
"~children": [
{
"#operator": "DistinctScan",
"scan": {
"#operator": "IndexScan3",
"index": "segments_idx",
"index_id": "87ffa977b0319b31",
"index_projection": {
"primary_key": true
},
"keyspace": "sample",
"namespace": "default",
"spans": [
{
"range": [
{
"high": "\"membes\"",
"inclusion": 1,
"low": "\"member\""
},
{
"high": "\"segmenu\"",
"inclusion": 1,
"low": "\"segment\""
}
]
}
],
"using": "gsi"
}
},
{
"#operator": "Fetch",
"keyspace": "sample",
"namespace": "default"
},
{
"#operator": "Parallel",
"~child": {
"#operator": "Sequence",
"~children": [
{
"#operator": "Filter",
"condition": "(((0 < (`sample`.`count`)) and ((`sample`.`member_id`) like \"member_%\")) and any `segment` in (`sample`.`segments`) satisfies (`segment` like \"segment_0\") end)"
},
{
"#operator": "InitialGroup",
"aggregates": [
"count(*)"
],
"group_keys": []
}
]
}
},
{
"#operator": "IntermediateGroup",
"aggregates": [
"count(*)"
],
"group_keys": []
},
{
"#operator": "FinalGroup",
"aggregates": [
"count(*)"
],
"group_keys": []
},
{
"#operator": "Parallel",
"~child": {
"#operator": "Sequence",
"~children": [
{
"#operator": "InitialProject",
"result_terms": [
{
"expr": "count(*)"
}
]
},
{
"#operator": "FinalProject"
}
]
}
}
]
},
"text": "SELECT count(*) FROM sample\nWHERE count > 0 AND member_id LIKE \"member_%\"\nAND ANY segment IN segments SATISFIES segment LIKE \"segment_0\" END;"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment