WITH archived_wells AS ( SELECT DISTINCT ac.WellId FROM cdf_nodes( 'sp_dm_dap_knowledge_graph', 'Activity', '0.71' ) ac JOIN contextualization.dap_wellview_wellid_space_mapping map ON ac.WellId = map.key WHERE map.Archived = TRUE AND ac.Archived = FALSE)SELECT s.externalId, s.space, s.WellId, true as ArchivedFROM cdf_nodes( 'sp_dm_dap_knowledge_graph', 'WellState', '0.71' ) sJOIN archived_wells aw ON s.WellId = aw.WellIdWHERE s.Archived = FALSE AND EXISTS ( SELECT 1 FROM archived_wells )WellState has 20M rows of data. To improve SQL performance, I want to use a CTE to get the IDs of archived wells and then update WellState (archived and WellId are indexed). However, I found that even when using EXISTS to check that the CTE result is empty, cdf_nodes still loads instances. In this case, shouldn’t the result just be empty?Additionally, when I replaced the CTE with a subquery,