Before planning a query, prune the materialized tables used to those that might help.