Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Studio doesn't print all the results of a fetch query unless a limit is specified #821

Open
shreyas1599 opened this issue Mar 5, 2024 · 0 comments

Comments

@shreyas1599
Copy link

Description

I have a query that prints ~3k results that fetches a single entity (with each entity having 5-10 attributes). I want to test out how much time the query takes to run. So I want to do something like this to estimate roughly how long it would take to retrieve and render the results. I'm using the time that studio shows as a lower limit on how long a query would take to run (as I have additional processing overhead in the API layer). I try to do this:

match ... $x isa entity...;
fetch $x: attribute; count;

But count doesn't seem to supported with fetch. So I do this:

1

match ... $x isa entity...;
fetch $x: attribute;

But Studio doesn't print all the results. So to get an accurate representation of the query response time, I have to do this first:

2

match ... $x isa entity...;
$x has unique-id $y;
get $y; count;

and then use that count to run the fetch query to output all the results.

3

match ... $x isa entity...;
fetch $x: attribute; limit <count from 2>;

I want to run 3 (without having to specify a limit) instead of modifying 2 (to fetch all the attributes individually) as I have around 5-10 attributes for each entity and it's easier to fetch all the attributes through a fetch as opposed to a get query. I want to do this to get a rough estimate of how much time it takes to run a query with all the attributes fetched.

Environment

  1. TypeDB distribution: Core
  2. TypeDB version: 2.26.0
  3. Environment: Mac
  4. Studio version: 2.26.0
  5. Other details:

Reproducible Steps

  1. Set up
    Run this:
match ... $x isa entity...;
fetch $x: attribute;
  1. Unexpected result

Doesn't print all the results if the number of expected responses is too large.

Expected result

Should print all the responses instead of truncating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants