I’m reading from the Result channel in golang and I’m not able to loop through the records fast enough. I’m running the following query in aql:
SELECT JobID FROM search.jobEmbeddings WHERE Location WITHIN CAST('{"type": "AeroCircle", "coordinates": [[-122.419416,37.774929], 160934]}' AS GEOJSON)
29217 rows in set (0.159 secs)
But when I perform the same query in golang code
QueryByLoc: time taken 0 (ms)
29217 items processed
Results loop: time taken 613 (ms)
it takes 4 times as long.
The records consist of a float array of size 100 and two small strings.
Network: I checked the networkIn on the machine and it peaks at 20 million bytes, I’m currently running this Aerospike database on a r3.xlarge instance (this was recommended by AS).
The speed I might expect is somewhere around 250ms or less for fetching 30k records.
Questions: Why might reading reading records from the channel be that much slower than running the query in aql?
I’m reading from the channel on the same box as the Aerospike instance. I’m trying to create a Search Engine using AS. I’m making Geo queries and I’m processing the results in my golang process.
Any help is greatly appreciated!
Thanks, Rob