Skip to content

Instantly share code, notes, and snippets.

@pavel-paulau
Created May 5, 2014 21:47
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 pavel-paulau/5e90939d6ab28034e3ed to your computer and use it in GitHub Desktop.
Save pavel-paulau/5e90939d6ab28034e3ed to your computer and use it in GitHub Desktop.
cbq> EXPLAIN SELECT name.f.f.f AS _name FROM bucket-1 WHERE coins.f > 224.210000 AND coins.f < 448.420000 LIMIT 20
{
"resultset": [
{
"input": {
"input": {
"expr": {
"operands": [
{
"left": {
"left": {
"left": {
"path": "bucket-1",
"type": "property"
},
"right": {
"path": "coins",
"type": "property"
},
"type": "dot_member"
},
"right": {
"path": "f",
"type": "property"
},
"type": "dot_member"
},
"right": {
"type": "literal_number",
"value": 224.21
},
"type": "greater_than"
},
{
"left": {
"left": {
"left": {
"path": "bucket-1",
"type": "property"
},
"right": {
"path": "coins",
"type": "property"
},
"type": "dot_member"
},
"right": {
"path": "f",
"type": "property"
},
"type": "dot_member"
},
"right": {
"type": "literal_number",
"value": 448.42
},
"type": "less_than"
}
],
"type": "and"
},
"input": {
"as": "bucket-1",
"bucket": "bucket-1",
"ids": null,
"input": {
"as": "",
"bucket": "bucket-1",
"cover": false,
"index": "by_coins",
"pool": "default",
"ranges": [
{
"high": [
448.42
],
"inclusion": "neither",
"limit": 0,
"low": [
224.21
]
}
],
"type": "scan"
},
"pool": "default",
"projection": null,
"type": "fetch"
},
"type": "filter"
},
"result": [
{
"as": "_name",
"expr": {
"left": {
"left": {
"left": {
"left": {
"path": "bucket-1",
"type": "property"
},
"right": {
"path": "name",
"type": "property"
},
"type": "dot_member"
},
"right": {
"path": "f",
"type": "property"
},
"type": "dot_member"
},
"right": {
"path": "f",
"type": "property"
},
"type": "dot_member"
},
"right": {
"path": "f",
"type": "property"
},
"type": "dot_member"
},
"star": false
}
],
"type": "projector"
},
"type": "limit",
"value": 20
}
],
"info": [
{
"caller": "http_response:160",
"code": 100,
"key": "total_rows",
"message": "1"
},
{
"caller": "http_response:162",
"code": 101,
"key": "total_elapsed_time",
"message": "4.874349ms"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment