We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
According to the CPU profiler,
The following code is very time-consuming; we need to merge the logic of fetching the table as much as possible
gravitino/core/src/main/java/org/apache/gravitino/storage/relational/service/TableMetaService.java
Lines 80 to 92 in 1297713
The SQL corresponding to getColumnsByTableIdAndVersion can be optimized:
getColumnsByTableIdAndVersion
https://github.com/apache/gravitino/blob/1297713992dfd376fc2a6fba805a6cdee61c4373/core/src/main/java/org/apache/gravitino/storage/relational/mapper/provider/base/TableColumnBaseSQLProvider.java#L28C17-L48
mysql> select -> * -> from -> table_column_version_info t1 -> inner join ( -> SELECT -> column_id, -> MAX(table_version) AS max_table_version -> from -> table_column_version_info -> where -> table_id = 2716478369449788787 -> and table_version <= 10 -> and deleted_at = 0 -> group by -> column_id -> ) t2 on t1.column_id = t2.column_id -> AND t1.table_version = t2.max_table_version; 8 rows in set (0.28 sec) mysql> select -> * -> from -> table_column_version_info t1 -> inner join ( -> SELECT -> column_id, -> MAX(table_version) AS max_table_version -> from -> table_column_version_info -> where -> table_id = 2716478369449788787 -> and table_version <= 10 -> and deleted_at = 0 -> group by -> column_id -> ) t2 on t1.column_id = t2.column_id -> AND t1.table_version = t2.max_table_version -> and table_id = 2716478369449788787; 8 rows in set (0.00 sec)
If we add a condition like table_id = xxxx in the end, It will more efficient.
table_id = xxxx
No response
The text was updated successfully, but these errors were encountered:
listColumnPOsByTableIdAndVersion
Successfully merging a pull request may close this issue.
What would you like to be improved?
According to the CPU profiler,
The following code is very time-consuming; we need to merge the logic of fetching the table as much as possible
gravitino/core/src/main/java/org/apache/gravitino/storage/relational/service/TableMetaService.java
Lines 80 to 92 in 1297713
The SQL corresponding to
getColumnsByTableIdAndVersion
can be optimized:https://github.com/apache/gravitino/blob/1297713992dfd376fc2a6fba805a6cdee61c4373/core/src/main/java/org/apache/gravitino/storage/relational/mapper/provider/base/TableColumnBaseSQLProvider.java#L28C17-L48
If we add a condition like
table_id = xxxx
in the end, It will more efficient.How should we improve?
No response
The text was updated successfully, but these errors were encountered: