To date, widely implemented and full-featured query languages for building models in their native exchange formats do not exist. While interesting proposals exist for querying Industry Foundation Classes (IFC) models, their functionality is often incomplete and their semantics not precisely defined. With the introduction of the ifcOWL ontology as an equivalent to the IFC schema in the Web Ontology Language (OWL), an option to represent such models in RDF (Resource Description Framework, a general information modeling method) is provided, and such models can be queried using SPARQL (SPARQL Protocol and RDF Query Language). The size of data sets in complex building projects, however, renders the use of clear-text encoded RDF infeasible in many cases. A SPARQL implementation, compatible with ifcOWL, is proposed, directly atop a standardized binary serialization format for IFC building models. This novel format is the binary equivalent of traditional IFC serialization formats but with more compact storage and less overhead than the graph serialization in RDF. The format is based on ISO 10303-26 and relies on an open standard for organizing large amounts of data: Hierarchical Data Format version 5 (HDF5). Due to hierarchical partitioning and fixed-length records, only small subsets of the data are read to answer queries, improving efficiency. A prototypical implementation of the query engine is provided in the Python programming language. In several realistic use cases, the proposed system performs equivalent to or better than the state of the art in SPARQL querying on building models. For large datasets, the proposed storage format results in files that are 2–3 times smaller than the current, most concise, RDF databases while offering a platform-neutral, containerized exchange file.