memory stats and updated query interface test