mchades commented on code in PR #9430:
URL: https://github.com/apache/gravitino/pull/9430#discussion_r2660834142


##########
core/src/main/java/org/apache/gravitino/storage/relational/service/FilesetMetaService.java:
##########
@@ -125,15 +119,37 @@ public FilesetEntity 
getFilesetByIdentifier(NameIdentifier identifier) {
   public List<FilesetEntity> listFilesetsByNamespace(Namespace namespace) {
     NamespaceUtil.checkFileset(namespace);
 
+    List<FilesetPO> filesetPOs = listFilesetPOs(namespace);
+    return POConverters.fromFilesetPOs(filesetPOs, namespace);
+  }
+
+  private List<FilesetPO> listFilesetPOs(Namespace namespace) {
+    return filesetListFetcher().apply(namespace);
+  }
+
+  private List<FilesetPO> listFilesetPOsBySchemaId(Namespace namespace) {

Review Comment:
   
   > > After using the new method, regardless of whether the cache is enabled, 
the database is accessed only once. So I think we can remove the cache here and 
refine the overall caching strategy based on the new method in another PR.
   > 
   > 
   > The new method will join 4 or 5 tables if cache is enabled, which will 
take longer compared with that using the `schemId` although they all just have 
a single query. When cache is enabled, and if we want to access several tables 
under a schema, `schemaId` will benefit us more.
   
   Do we have quantitative data to compare the performance difference between 
these two queries? Because most of the table data can be filtered out in the 
join, I'm not sure how much performance overhead the join query will introduce.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to