diff --git a/packages/ui/src/ui/pages/query-tracker/QueryResultsView/ResultPaginator/index.tsx b/packages/ui/src/ui/pages/query-tracker/QueryResultsView/ResultPaginator/index.tsx
index 65ecff13a..1580d878c 100644
--- a/packages/ui/src/ui/pages/query-tracker/QueryResultsView/ResultPaginator/index.tsx
+++ b/packages/ui/src/ui/pages/query-tracker/QueryResultsView/ResultPaginator/index.tsx
@@ -81,9 +81,12 @@ export function ResultPaginator({queryId, resultIndex, className}: Props) {
[dispatch],
);
- const goToPage = useCallback((page: number) => {
- dispatch(updateQueryResult(queryId, resultIndex, page));
- }, []);
+ const goToPage = useCallback(
+ (page: number) => {
+ dispatch(updateQueryResult(queryId, resultIndex, page));
+ },
+ [queryId],
+ );
return (
diff --git a/packages/ui/src/ui/pages/query-tracker/QueryResultsView/index.scss b/packages/ui/src/ui/pages/query-tracker/QueryResultsView/index.scss
index c1010b4a3..eaa465257 100644
--- a/packages/ui/src/ui/pages/query-tracker/QueryResultsView/index.scss
+++ b/packages/ui/src/ui/pages/query-tracker/QueryResultsView/index.scss
@@ -3,6 +3,10 @@
position: relative;
overflow: auto;
+ &__result-info {
+ margin-bottom: 10px;
+ }
+
&__loading {
display: flex;
align-items: center;
diff --git a/packages/ui/src/ui/pages/query-tracker/QueryResultsView/index.tsx b/packages/ui/src/ui/pages/query-tracker/QueryResultsView/index.tsx
index 530ad4aff..341601e17 100644
--- a/packages/ui/src/ui/pages/query-tracker/QueryResultsView/index.tsx
+++ b/packages/ui/src/ui/pages/query-tracker/QueryResultsView/index.tsx
@@ -1,4 +1,4 @@
-import {Loader} from '@gravity-ui/uikit';
+import {Loader, Text} from '@gravity-ui/uikit';
import React from 'react';
import {useSelector} from 'react-redux';
import block from 'bem-cn-lite';
@@ -20,14 +20,30 @@ import './index.scss';
const b = block('query-result-table');
+const getResultRowsInfo = (result: QueryResultReadyState) => {
+ const {row_count: total} = result.meta.data_statistics;
+ const {is_truncated: truncated} = result.meta;
+ const {pageSize} = result.settings;
+ const start = pageSize * result.page + 1;
+ const end = Math.min(pageSize * result.page + pageSize, total);
+ return {start, end, total, truncated};
+};
+
function QueryReadyResultView({result}: {result: QueryResultReadyState}) {
const mode = result?.settings?.viewMode;
+ const {start, end, total, truncated} = getResultRowsInfo(result);
return (
<>
+
+
+ Rows {start}-{end} of {total}
+ {`${truncated ? ' (truncated)' : ''}`}
+
+
>
diff --git a/packages/ui/src/ui/pages/query-tracker/module/api.ts b/packages/ui/src/ui/pages/query-tracker/module/api.ts
index 961935ba3..b0f4e1291 100644
--- a/packages/ui/src/ui/pages/query-tracker/module/api.ts
+++ b/packages/ui/src/ui/pages/query-tracker/module/api.ts
@@ -397,6 +397,7 @@ export type QueryResultMeta = {
};
$value: QueryResultMetaScheme[];
};
+ is_truncated: boolean;
data_statistics: {
chunk_count: number;
row_count: number;