StarRocks / starrocks

The world's fastest open query engine for sub-second analytics both on and off the data lakehouse. With the flexibility to support nearly any scenario, StarRocks provides best-in-class performance for multi-dimensional analytics, real-time analytics, and ad-hoc queries. A Linux Foundation project.
https://starrocks.io
Apache License 2.0
9.01k stars 1.81k forks source link

/api/show_data automatically aggregates results by db or table #34477

Open sduzh opened 1 year ago

sduzh commented 1 year ago

Feature request

Provides an option to count the data size of all databases or tables via the RESTful API /api/show_data.

Jin-H commented 1 year ago

I want try this task, can you assign it to me?

sduzh commented 1 year ago

I want try this task, can you assign it to me?

Of course! If you have any questions, please feel free to discuss with me at any time.

Jin-H commented 12 months ago

Feature request

Provides an option to count the data size of all databases or tables via the RESTful API /api/show_data.

I have a question about this requirement. Should I provide a table parameter to indicate that I want to count the current table size?

In show data statement we can calculate each table size in table format

StarRocks > show data;
+--------------------------+----------------+---------------------+
| TableName                | Size           | ReplicaCount        |
+--------------------------+----------------+---------------------+
| table_1                       | 587.555 KB     | 36                  |
| table_2                      | 88.386 KB       | 36                  |
| table_3                      | 433.913 KB     | 36                  |
| table_4                      | 0.000 B           | 36                  |
| table_5                      | 71.426 KB       | 36                  |
| table_6                      | 166.251 KB     | 36                  |
| table_7                      | 49.008 KB      | 36                  |
| table_8                      | 6.404 MB       | 36                  |
| table_9                      | 5.617 MB        | 36                  |
| table_10                    | 433.913 KB     | 36                  |
| Total                          | 13.809 MB      | 360                 |
| Quota                        | 8388608.000 TB | 9223372036854775807 |
| Left                            | 8388608.000 TB | 9223372036854775447 |
+--------------------------+----------------+---------------------+

Do we want to remain unified?

sduzh commented 12 months ago

Feature request

Provides an option to count the data size of all databases or tables via the RESTful API /api/show_data.

I have a question about this requirement. Should I provide a table parameter to indicate that I want to count the current table size?

In show data statement we can calculate each table size in table format

StarRocks > show data;
+--------------------------+----------------+---------------------+
| TableName                | Size           | ReplicaCount        |
+--------------------------+----------------+---------------------+
| table_1                       | 587.555 KB     | 36                  |
| table_2                      | 88.386 KB       | 36                  |
| table_3                      | 433.913 KB     | 36                  |
| table_4                      | 0.000 B           | 36                  |
| table_5                      | 71.426 KB       | 36                  |
| table_6                      | 166.251 KB     | 36                  |
| table_7                      | 49.008 KB      | 36                  |
| table_8                      | 6.404 MB       | 36                  |
| table_9                      | 5.617 MB        | 36                  |
| table_10                    | 433.913 KB     | 36                  |
| Total                          | 13.809 MB      | 360                 |
| Quota                        | 8388608.000 TB | 9223372036854775807 |
| Left                            | 8388608.000 TB | 9223372036854775447 |
+--------------------------+----------------+---------------------+

Do we want to remain unified?

I think it's ok.

github-actions[bot] commented 6 months ago

We have marked this issue as stale because it has been inactive for 6 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to StarRocks!

kevincai commented 3 months ago

@Jin-H are you still working on this issue?