Low-level query engine.