more comprehensive table scanning and querying