An instance of a slow query


#1

I found a very slow query in my app:
match $app_cap isa capability_function has db_id $id; get;
It takes over 30 minutes before I give up. However, if I run a very similar query:
match $app_cap isa capability_function; get;
It completes in under a second. I’m using Grakn-core 1.4.3.

match $app_cap isa capability_function; aggregate count;
12

#2

Just wondering,

What’s the aggregate count of db_id?

I would take a guess and say orders of magnitude bigger.


#3
match $app_cap isa db_id; aggregate count;
114604

The query took about 30 seconds to run


#4

Let’s be nice and make nice topic titles. This is an open source community. I’ve renamed the title for now.