You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As each document in defradb consist of several fields with each of them being stored separately. Hence fetching 1 doc that has only 1 field and fetching 1 doc that has dozens of fields has a big difference.
That's why it would be a valuable information to add the number of fields fetched to the @Explain query.
The text was updated successfully, but these errors were encountered:
islamaliev
changed the title
Add propFetched metric to @explain
Add fieldFetched metric to @explain
Jul 14, 2023
## Relevant issue(s)
Resolves#1636 and #1637
## Description
With this change the calculation of stats for fetching documents is
moved to fetcher.
This was necessary because each call to `fetcher.FetchNext...` could
potentially perform multiple doc fetches.
But scanNode (previously responsible for this) would just increment by 1.
Moreover, scanNode would incorrectly count end of fetching (returned nil
doc) as 1 as well.
Also this fix introduces another (probably more important) metric
`fieldFetches` which better indicates the execution cost because
it much closer correlates with number of IO operations, as eace
document's field is stored in a separate KV pair.
…rk#1713)
## Relevant issue(s)
Resolvessourcenetwork#1636 and sourcenetwork#1637
## Description
With this change the calculation of stats for fetching documents is
moved to fetcher.
This was necessary because each call to `fetcher.FetchNext...` could
potentially perform multiple doc fetches.
But scanNode (previously responsible for this) would just increment by 1.
Moreover, scanNode would incorrectly count end of fetching (returned nil
doc) as 1 as well.
Also this fix introduces another (probably more important) metric
`fieldFetches` which better indicates the execution cost because
it much closer correlates with number of IO operations, as eace
document's field is stored in a separate KV pair.
As each document in defradb consist of several fields with each of them being stored separately. Hence fetching 1 doc that has only 1 field and fetching 1 doc that has dozens of fields has a big difference.
That's why it would be a valuable information to add the number of fields fetched to the @Explain query.
The text was updated successfully, but these errors were encountered: