Commit bae40fa
feat(executeQuery): add collectStats parameter
Now you can receive statistics information, for example, the number
of reading rows, affectedShards and so on.
const data = await session.executeQuery(
'select * from series',
{},
AUTO_TX,
undefined,
undefined,
Ydb.Table.QueryStatsCollection.Mode.STATS_COLLECTION_BASIC
);
const stats_rows_read = (data.queryStats!.queryPhases!['0'].
tableAccess!['0'].reads!.rows as Long).low;
const affectedShards = (data.queryStats!.queryPhases!['0'].
affectedShards as Long).low;1 parent b80de4e commit bae40fa
2 files changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
| 332 | + | |
332 | 333 | | |
333 | 334 | | |
334 | 335 | | |
| |||
352 | 353 | | |
353 | 354 | | |
354 | 355 | | |
| 356 | + | |
355 | 357 | | |
356 | 358 | | |
357 | 359 | | |
| |||
0 commit comments