https://pinot.apache.org/ logo
#general
Title
# general
c

Chengxuan Wang

03/04/2022, 2:12 PM
hey I was trying to use geoindex feature in pinot. but seems the index doesn’t apply because the
numEntriesScannedInFilter
. is high (equals to the number of docs). the pinot version is
0.8.0
. the query is
Copy code
select count(*) from some_table where  st_distance(resto_st_point, st_point(116.459717 , 39.955734, 1)) < 3000
the table config is
Copy code
"fieldConfigList": [
      {
        "name": "resto_st_point",
        "encodingType": "RAW",
        "indexType": "H3",
        "properties": {
          "resolutions": "12"
        }
      }
    ],
.....
      "noDictionaryColumns": [
        "resto_st_point"
      ],
and if i change the threshold to 300 (meters), the index hits.
m

Mayank

03/04/2022, 5:25 PM
@User ^^
y

Yupeng Fu

03/04/2022, 9:52 PM
check the query plan in trace mode and see why index is not in use
c

Chengxuan Wang

03/04/2022, 11:21 PM
let me check.
is this the right trace:
Copy code
"0_0": [
        {
          "H3IndexFilterOperator Time": 0
        },
        {
          "RangeDocIdSetOperator Time": 0
        },
        {
          "ProjectionOperator Time": 0
        },
        {
          "RangeDocIdSetOperator Time": 0
        },
        {
          "ProjectionOperator Time": 0
        },
not sure how to interpret it.
and this is for meter is 300.
Copy code
{
          "H3IndexFilterOperator Time": 6
        },
        {
          "DocIdSetOperator Time": 6
        },
        {
          "ProjectionOperator Time": 6
        },
cc @User @User
y

Yupeng Fu

03/05/2022, 4:03 AM
That means the h3index operator is used
For both queries
c

Chengxuan Wang

03/05/2022, 4:24 AM
oh.ok.
does it mean i didn’t setup resolution correct? for the first query (threshold is 3000 meters),
H3IndexFilterOperator Time
is always just
0
or
1
.
@User
y

Yupeng Fu

03/05/2022, 4:30 AM
whats the resolution did you use?
c

Chengxuan Wang

03/05/2022, 4:30 AM
12
y

Yupeng Fu

03/05/2022, 4:30 AM
if resolution is too small, then you'll have lots of small indices
12 is 9m
too small
c

Chengxuan Wang

03/05/2022, 4:33 AM
oh. I see. i understand it wrong. i thought the resolution is the bigger the faster.