Discussion Forum

An instance of a slow query

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;

Just wondering,

What’s the aggregate count of db_id?

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

match $app_cap isa db_id; aggregate count;

The query took about 30 seconds to run

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