Virtual fields

Why related values can be partial

Why a correct formula over part of a collection gives a partial answer, which DynamoDB reads a table link issues, and when Dynomatic reads again.

A related value is only as complete as the items Dynomatic read for it. A count or a total can cover part of a collection, and every item Dynomatic reads to complete it is a DynamoDB read.

A correct formula over part of a collection

A query link reads a fixed number of items for each row, 10 by default and at most 25. A satellite with 46 passes therefore shows its first 25 in a link that reads 25 per row. An aggregate such as $sum($items.bytesDown) adds those 25 correctly. The answer is still not the satellite’s total, because the expression never saw the other 21 passes.

No formula can fix that from inside. An expression computes over the items its context gives it, and $items holds only what was read. Dynomatic keeps the value and marks it rather than hiding it, because a partial total is still useful, as long as it never passes for a complete one.

How Dynomatic knows a value is partial

Each query asks DynamoDB for one item more than the cell shows. When that extra item comes back, the row has more, and the cell is marked.

The mark then says what Dynomatic can conclude about the full value.

  • A count reads 25+. The real count is at least 25.
  • For $count, $max, or a $sum whose terms are all zero or more, the full value can only be larger, so the cell reads ≥. Corvid-2’s Data downlinked reads ≥356.3 GB.
  • For anything else, such as an average or the time of the newest contact, the missing items could move the value either way, so the cell reads ~.

Dynomatic cannot inspect an arbitrary expression and prove what the rest of the items would do to it. It recognizes the few shapes where the direction is certain and treats every other expression as approximate.

Why not read everything

Reading a whole collection for every row on every refresh would cost reads in proportion to the size of the data, not the size of the screen. A table of 1,000 orders with 50 lines each would read 50,000 items to draw one page.

So reads follow what you look at. Collection cells query only the rows on screen and one screen above and below, once scrolling stops for 100 ms. A row you never scroll to is never queried. Making a value exact is a separate, deliberate step: Compute Exact on one cell, Read every value in the viewer, or $relatedAll in a field that should always be exact. $relatedAll reads every item of every row it computes, each time the query runs, so it moves the cost back up.

Fields computed across loaded rows follow the same idea at the level of the grid. A rank or a running total covers the rows this tab loaded, and says Depends on loaded rows because loading another page changes it.

A link to one item, or to items from a list, reads by key. For each batch of up to 100 rows, Dynomatic builds every row’s key and reads each unique key the tab has not read yet. One key uses GetItem. More keys use BatchGetItem, up to 100 keys per request. Equal keys count once, so 100 orders over 40 customers cost one request of 40 keys.

A query link sends one Query per distinct key condition. Rows that build the same condition on the same table, index and order share one query, so 100 rows that point at 10 partitions cost 10 queries. At most 4 queries run at once against one target table.

Both kinds ask only for the attributes their columns read, plus the target’s key. An expression that reads $related("satellite").storageBytes adds storageBytes. Any other use of $related, and every aggregate, reads whole items.

A column hidden in the Columns menu reads nothing while it is hidden, unless the grid sorts or filters by it.

Each link reads with its target workspace’s own profile, region and sign-in, never the open table’s. Links into two accounts send separate requests.

When Dynomatic reads again

Each table tab keeps the related items it read. Switching tabs, sorting, filtering, and opening the item view or compare read nothing for a key already read. A key is read again only in these cases:

  • the query runs again, from Run, a refresh, or an auto-refresh tick
  • a pending edit changes a row’s key attribute
  • a new column or an edited link needs an attribute or a key no earlier read covered
  • the item dropped out of what Dynomatic holds, which is the related items of the 32 most recently used results

Where the reads show up

Every one of these reads counts toward Related reads in the cost strip, apart from Actual, which stays the read your query made. Related reads lists what adds to it. Filters on computed values never reach DynamoDB, so they narrow the loaded rows without changing what any page reads or costs. Know what a read costs covers the estimate and Actual.

Last updated on