This is an early build from the main code line of our next major release, with light-weight quality tests run on top of it. If you’re a developer, here is an opportunity for you to try out the leading-edge bits from Couchbase in your developer environment and provide us with you feedback through our forums or using JIRA.
Our January Developer Build introduces the following new features –
And for some N1QL,the plan don’t show any thing but error:
TypeError: Cannot read property '#operator' of undefined
at makeTreeFromPlanNodes (http://127.0.0.1:8091/_p/ui/query/ui-current/query_plan_viz/qw-explain-viz.directive.js:103:31)
at makeTreeFromPlanNodes (http://127.0.0.1:8091/_p/ui/query/ui-current/query_plan_viz/qw-explain-viz.directive.js:137:19)
at makeTreeFromPlanNodes (http://127.0.0.1:8091/_p/ui/query/ui-current/query_plan_viz/qw-explain-viz.directive.js:137:19)
at makeTreeFromPlanNodes (http://127.0.0.1:8091/_p/ui/query/ui-current/query_plan_viz/qw-explain-viz.directive.js:137:19)
at makeTreeFromPlanNodes (http://127.0.0.1:8091/_p/ui/query/ui-current/query_plan_viz/qw-explain-viz.directive.js:137:19)
at makeTreeFromPlanNodes (http://127.0.0.1:8091/_p/ui/query/ui-current/query_plan_viz/qw-explain-viz.directive.js:137:19)
at makeTreeFromPlanNodes (http://127.0.0.1:8091/_p/ui/query/ui-current/query_plan_viz/qw-explain-viz.directive.js:137:19)
at makeTreeFromPlanNodes (http://127.0.0.1:8091/_p/ui/query/ui-current/query_plan_viz/qw-explain-viz.directive.js:137:19)
at makeTreeFromPlanNodes (http://127.0.0.1:8091/_p/ui/query/ui-current/query_plan_viz/qw-explain-viz.directive.js:137:19)
at makeTreeFromPlanNodes (http://127.0.0.1:8091/_p/ui/query/ui-current/query_plan_viz/qw-explain-viz.directive.js:137:19) undefined
And when I switch to [Plan Text],the following error shows:
Error: [$rootScope:infdig] http://errors.angularjs.org/1.4.8/$rootScope/infdig?p0=10&p1=%5B%5B%7B%22msg%22%3ANaNn%3A%function%20()%20%7B%5Cn%20%20%20%20%20%20%20%20%20%20return%20%5Belm%5B0%5D.offsetWidth%2C%20elm%5B0%5D.offsetHeight%5D%3B%5Cn%20%20%20%20%20%20%20%20%7D%22%2C%22newVal%22%3A%5B844%2C309%5D%2C%oldVal%22%3A%5B844%2C310%5D%7D%2C%7B%22msg%22%3A%fn%3A%function%20()%20%7B%5Cn%20%20%20%20%20%20%20%20%20%20return%20%5Belm%5B0%5D.offsetWidth%2C%20elm%5B0%5D.offsetHeight%5D%3B%5Cn%20%20%20%20%20%20%20%20%7D%22%2C%22newVal%22%3A%5B844%2C127%5D%2C%oldVal%22%3A%5B844%2C128%5D%7D%5D%2C%5B%7B%22msg%22%3A%fn%3A%function%20()%20%7B%5Cn%20%20%20%20%20%20%20%20%20%20return%20%5Belm%5B0%5D.offsetWidth%2C%20elm%5B0%5D.offsetHeight%5D%3B%5Cn%20%20%20%20%20%20%20%20%7D%22%2C%22newVal%22%3A%5B844%2C310%5D%2C%oldVal%22%3A%5B844%2C309%5D%7D%2C%7B%22msg%22%3A%fn%3A%function%20()%20%7B%5Cn%20%20%20%20%20%20%20%20%20%20return%20%5Belm%5B0%5D.offsetWidth%2C%20elm%5B0%5D.offsetHeight%5D%3B%5Cn%20%20%20%20%20%20%20%20%7D%22%2C%22newVal%22%3A%5B844%2C128%5D%2C%oldVal%22%3A%5B844%2C127%5D%7D%5D%2C%5B%7B%22msg%22%3A%fn%3A%function%20()%20%7B%5Cn%20%20%20%20%20%20%20%20%20%20return%20%5Belm%5B0%5D.offsetWidth%2C%20elm%5B0%5D.offsetHeight%5D%3B%5Cn%20%20%20%20%20%20%20%20%7D%22%2C%22newVal%22%3A%5B844%2C309%5D%2C%oldVal%22%3A%5B844%2C310%5D%7D%2C%7B%22msg%22%3A%fn%3A%function%20()%20%7B%5Cn%20%20%20%20%20%20%20%20%20%20return%20%5Belm%5B0%5D.offsetWidth%2C%20elm%5B0%5D.offsetHeight%5D%3B%5Cn%20%20%20%20%20%20%20%20%7D%22%2C%22newVal%22%3A%5B844%2C127%5D%2C%oldVal%22%3A%5B844%2C128%5D%7D%5D%2C%5B%7B%22msg%22%3A%fn%3A%function%20()%20%7B%5Cn%20%20%20%20%20%20%20%20%20%20return%20%5Belm%5B0%5D.offsetWidth%2C%20elm%5B0%5D.offsetHeight%5D%3B%5Cn%20%20%20%20%20%20%20%20%7D%22%2C%22newVal%22%3A%5B844%2C310%5D%2C%oldVal%22%3A%5B844%2C309%5D%7D%2C%7B%22msg%22%3A%fn%3A%function%20()%20%7B%5Cn%20%20%20%20%20%20%20%20%20%20return%20%5Belm%5B0%5D.offsetWidth%2C%20elm%5B0%5D.offsetHeight%5D%3B%5Cn%20%20%20%20%20%20%20%20%7D%22%2C%22newVal%22%3A%5B844%2C128%5D%2C%oldVal%22%3A%5B844%2C127%5D%7D%5D%2C%5B%7B%22msg%22%3A%fn%3A%function%20()%20%7B%5Cn%20%20%20%20%20%20%20%20%20%20return%20%5Belm%5B0%5D.offsetWidth%2C%20elm%5B0%5D.offsetHeight%5D%3B%5Cn%20%20%20%20%20%20%20%20%7D%22%2C%22newVal%22%3A%5B844%2C309%5D%2C%oldVal%22%3A%5B844%2C310%5D%7D%2C%7B%22msg%22%3A%fn%3A%function%20()%20%7B%5Cn%20%20%20%20%20%20%20%20%20%20return%20%5Belm%5B0%5D.offsetWidth%2C%20elm%5B0%5D.offsetHeight%5D%3B%5Cn%20%20%20%20%20%20%20%20%7D%22%2C%22newVal%22%3A%5B844%2C127%5D%2C%oldVal%22%3A%5B844%2C128%5D%7D%5D%5D
at http://127.0.0.1:8091/ui/libs/angular.min.js:6:416
at r.$digest (http://127.0.0.1:8091/ui/libs/angular.min.js:131:499)
at r.$apply (http://127.0.0.1:8091/ui/libs/angular.min.js:134:78)
at HTMLAnchorElement.<anonymous> (http://127.0.0.1:8091/ui/libs/angular.min.js:254:126)
at If (http://127.0.0.1:8091/ui/libs/angular.min.js:35:367)
at HTMLAnchorElement.d (http://127.0.0.1:8091/ui/libs/angular.min.js:35:314)
(anonymous) @ angular.min.js:107
angular.min.js:107 Object undefined
(anonymous) @ angular.min.js:107
angular.min.js:134 Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.4.8/$rootScope/infdig?p0=10&p1=%5B%5B%7B%22ms…2C%22newVal%22%3A%5B844%2C127%5D%2C%22oldVal%22%3A%5B844%2C128%5D%7D%5D%5D
at angular.min.js:6
at r.$digest (angular.min.js:131)
at r.$apply (angular.min.js:134)
at HTMLAnchorElement.<anonymous> (angular.min.js:254)
at If (angular.min.js:35)
at HTMLAnchorElement.d (angular.min.js:35)
[Suggestion] If we can easy order by #times info in the result view, it will be more easily to optimize N1QL by easily to find which part of N1QL will take more time.
Hi @atom_yang. We are working on visually distinguishing the more expensive operators using color. The current working thresholds are 1-5% of total query time, 5-10%, 10-20%, and > 20%. So you should be able to quickly identify those expensive operators.
Sorting would be more of a challenge, since the current ordering gives important information about where an operator can be found in the overall plan. We did experiment with an additional tabular view of operators - it might be possible to make something like that sortable.
Let us know how well the coloring works (it is not ready for the latest developer release, but should be in the next one).