mirror of https://gitee.com/bigwinds/arangodb
41 lines
1.4 KiB
Plaintext
41 lines
1.4 KiB
Plaintext
@Q:
|
|
FOR startCity IN germanCity
|
|
FILTER GEO_DISTANCE(@bonn, startCity.geometry) < @radius
|
|
RETURN startCity._key
|
|
@B
|
|
{
|
|
<span class="hljs-string">"bonn"</span>: [
|
|
<span class="hljs-number">7.0998</span>,
|
|
<span class="hljs-number">50.734</span>
|
|
],
|
|
<span class="hljs-string">"radius"</span>: <span class="hljs-number">400000</span>
|
|
}
|
|
@R
|
|
Query String (119 chars, cacheable: true):
|
|
FOR startCity IN germanCity
|
|
FILTER GEO_DISTANCE(@bonn, startCity.geometry) < @radius
|
|
RETURN startCity._key
|
|
|
|
|
|
Execution plan:
|
|
Id NodeType Est. Comment
|
|
1 SingletonNode 1 * ROOT
|
|
7 IndexNode 3 - FOR startCity IN germanCity /* geo index scan, projections: `_key` */
|
|
5 CalculationNode 3 - LET #3 = startCity.`_key` /* attribute expression */ /* collections used: startCity : germanCity */
|
|
6 ReturnNode 3 - RETURN #3
|
|
|
|
Indexes used:
|
|
By Name Type Collection Unique Sparse Selectivity Fields Ranges
|
|
7 idx_1646382032912121858 geo germanCity false true n/a [ `geometry` ] (GEO_DISTANCE([ 7.0998, 50.734 ], startCity.`geometry`) < 400000)
|
|
|
|
Optimization rules applied:
|
|
Id RuleName
|
|
1 move-calculations-up
|
|
2 move-filters-up
|
|
3 move-calculations-up-2
|
|
4 move-filters-up-2
|
|
5 geo-index-optimizer
|
|
6 remove-unnecessary-calculations-2
|
|
7 reduce-extraction-to-projection
|
|
|